Skip to content

Commit

Permalink
Add ContributionAdmin class and register Contribution model in admin
Browse files Browse the repository at this point in the history
  • Loading branch information
DonnieBLT committed Nov 10, 2024
1 parent e5bad5e commit 2b20a42
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions website/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
ChatBotLog,
Company,
CompanyAdmin,
Contribution,
ContributorStats,
Domain,
Hunt,
Expand Down Expand Up @@ -407,6 +408,13 @@ class TimeLogAdmin(admin.ModelAdmin):
)


class ContributionAdmin(admin.ModelAdmin): # Added class
list_display = ("user", "title", "description", "status", "created", "txid")
list_filter = ["status", "user"]
search_fields = ["title", "description", "user__username"]
date_hierarchy = "created"


# Register all models with their respective admin classes
admin.site.register(Project, ProjectAdmin)
admin.site.register(ContributorStats)
Expand All @@ -430,6 +438,7 @@ class TimeLogAdmin(admin.ModelAdmin):
admin.site.register(Suggestion, SuggestionAdmin)
admin.site.register(SuggestionVotes, SuggestionVotesAdmin)
admin.site.register(TimeLog, TimeLogAdmin)
admin.site.register(Contribution, ContributionAdmin) # Added registration

# Register missing models
admin.site.register(InviteFriend)
Expand Down

0 comments on commit 2b20a42

Please sign in to comment.