Add ordering, templatetags, update pagination
This commit is contained in:
parent
1dbd1c1779
commit
7c7eb0061d
10 changed files with 93 additions and 52 deletions
|
@ -57,11 +57,11 @@ class LocationAdmin(admin.ModelAdmin):
|
|||
|
||||
class AlbumAdmin(admin.ModelAdmin):
|
||||
prepopulated_fields = {'slug': ('name',)}
|
||||
list_display = ('__str__', 'name', 'location', 'album_date', 'is_public', 'thumbnail', )
|
||||
list_display = ('name', 'location', 'album_date', 'is_public', 'thumbnail', )
|
||||
search_fields = ('name',)
|
||||
ordering = ('-album_date',)
|
||||
list_per_page = 20
|
||||
list_editable = ('name', 'is_public', 'location')
|
||||
list_editable = ('is_public',)
|
||||
readonly_fields = ['cover_preview'] # Lisätään esikatselukuva readonly_fieldsiin
|
||||
|
||||
def cover_preview(self, obj):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue