Version: drop file field, use files instead #193
@ -76,7 +76,7 @@ class FileAdmin(admin.ModelAdmin):
|
||||
'date_created',
|
||||
'date_modified',
|
||||
'date_status_changed',
|
||||
'versionfiles__version',
|
||||
('version', admin.EmptyFieldListFilter),
|
||||
('icon_of', admin.EmptyFieldListFilter),
|
||||
('featured_image_of', admin.EmptyFieldListFilter),
|
||||
('preview', admin.EmptyFieldListFilter),
|
||||
@ -87,7 +87,7 @@ class FileAdmin(admin.ModelAdmin):
|
||||
'date_created',
|
||||
'type',
|
||||
'status',
|
||||
link_to('versionfiles__version', 'version of'),
|
||||
link_to('version', 'version of'),
|
||||
link_to('icon_of'),
|
||||
link_to('featured_image_of'),
|
||||
link_to('preview_set.extension', 'preview of'),
|
||||
@ -95,16 +95,15 @@ class FileAdmin(admin.ModelAdmin):
|
||||
)
|
||||
|
||||
list_select_related = (
|
||||
'versionfiles__version__extension',
|
||||
'user',
|
||||
'versionfiles__version',
|
||||
'validation',
|
||||
)
|
||||
list_prefetch_related = (
|
||||
'icon_of',
|
||||
'featured_image_of',
|
||||
'preview_set__extension',
|
||||
'versionfiles__version',
|
||||
'version',
|
||||
'version__extension',
|
||||
)
|
||||
|
||||
autocomplete_fields = ['user']
|
||||
|
Loading…
Reference in New Issue
Block a user