Add BackgroundImage model and enhance card templates with dynamic backgrounds
This commit is contained in:
+8
-1
@@ -1,8 +1,15 @@
|
||||
from django.contrib import admin
|
||||
from .models import Dinosaur
|
||||
from .models import Dinosaur, BackgroundImage
|
||||
|
||||
|
||||
@admin.register(Dinosaur)
|
||||
class DinosaurAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'era', 'diet', 'speed', 'weight', 'intelligence')
|
||||
search_fields = ('name', 'era', 'diet')
|
||||
|
||||
|
||||
@admin.register(BackgroundImage)
|
||||
class BackgroundImageAdmin(admin.ModelAdmin):
|
||||
list_display = ('__str__', 'is_active', 'uploaded_at')
|
||||
list_filter = ('is_active',)
|
||||
search_fields = ('title',)
|
||||
|
||||
Reference in New Issue
Block a user