mirror of
https://github.com/bratusev07/skb-market.git
synced 2026-12-05 05:09:44 +00:00
feat: auth, role and moderation logic added
This commit is contained in:
1 parent
1212dca845
commit
36b1341a10
14 files changed
+821
-175
No files matched your search
+8
-2
@@ -1,7 +1,7 @@
|
||||
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import Game, Screenshot
|
||||
from .models import Game, Screenshot, Tag
|
||||
|
||||
|
||||
@admin.register(Game)
|
||||
@@ -14,7 +14,7 @@ class GameAdmin(admin.ModelAdmin):
|
||||
"created_by",
|
||||
"updated_at",
|
||||
)
|
||||
list_filter = ("status", "unity_version")
|
||||
list_filter = ("status", "unity_version", "tags")
|
||||
search_fields = ("title", "author_name", "created_by__username")
|
||||
ordering = ("-updated_at",)
|
||||
|
||||
@@ -23,3 +23,9 @@ class GameAdmin(admin.ModelAdmin):
|
||||
class ScreenshotAdmin(admin.ModelAdmin):
|
||||
list_display = ("game", "image")
|
||||
search_fields = ("game__title",)
|
||||
|
||||
@admin.register(Tag)
|
||||
class TagAdmin(admin.ModelAdmin):
|
||||
list_display = ("name", "slug")
|
||||
search_fields = ("name", "slug")
|
||||
prepopulated_fields = {"slug": ("name",)}
|
||||
Reference in new issue
Block a user