Skip to content

Commit

Permalink
feat: add ContributorStats admin interface and template for displayin…
Browse files Browse the repository at this point in the history
…g contributor statistics
  • Loading branch information
JisanAR03 committed Jan 9, 2025
1 parent 4747b9b commit 1e5b263
Show file tree
Hide file tree
Showing 5 changed files with 964 additions and 1 deletion.
7 changes: 7 additions & 0 deletions website/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
ChatBotLog,
Contribution,
Contributor,
ContributorStats,
Domain,
Hunt,
HuntPrize,
Expand Down Expand Up @@ -424,6 +425,11 @@ class ContributorAdmin(admin.ModelAdmin):
search_fields = ["name", "github_id"]


class ContributorStatsAdmin(admin.ModelAdmin):
list_display = ("contributor", "repo", "date", "granularity")
search_fields = ["contributor", "repo"]


class TagAdmin(admin.ModelAdmin):
list_display = ("name", "slug", "created")
prepopulated_fields = {"slug": ("name",)}
Expand Down Expand Up @@ -456,6 +462,7 @@ class PostAdmin(admin.ModelAdmin):
admin.site.register(Project, ProjectAdmin)
admin.site.register(Repo, RepoAdmin)
admin.site.register(Contributor, ContributorAdmin)
admin.site.register(ContributorStats, ContributorStatsAdmin)
admin.site.register(Bid, BidAdmin)
admin.site.register(UserProfile, UserProfileAdmin)
admin.site.register(User, UserAdmin)
Expand Down
Loading

0 comments on commit 1e5b263

Please sign in to comment.