Autocomplete slug for tag
This commit is contained in:
parent
3c8e34db92
commit
3a24fbdc28
1 changed files with 2 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ class PhotoAdmin(admin.ModelAdmin):
|
||||||
'is_public', 'view_count', 'admin_thumbnail', 'get_owner')
|
'is_public', 'view_count', 'admin_thumbnail', 'get_owner')
|
||||||
list_filter = ['date_added', 'is_public', 'owner']
|
list_filter = ['date_added', 'is_public', 'owner']
|
||||||
search_fields = ['title', 'slug', 'caption']
|
search_fields = ['title', 'slug', 'caption']
|
||||||
list_per_page = 10
|
list_per_page = 25
|
||||||
prepopulated_fields = {'slug': ('title',)}
|
prepopulated_fields = {'slug': ('title',)}
|
||||||
readonly_fields = ('date_taken',)
|
readonly_fields = ('date_taken',)
|
||||||
model = Photo
|
model = Photo
|
||||||
|
|
@ -33,6 +33,7 @@ class PhotoAdmin(admin.ModelAdmin):
|
||||||
class TagAdmin(admin.ModelAdmin):
|
class TagAdmin(admin.ModelAdmin):
|
||||||
list_display = ('name',)
|
list_display = ('name',)
|
||||||
search_fields = ('name',)
|
search_fields = ('name',)
|
||||||
|
prepopulated_fields = {'slug': ('name',)}
|
||||||
model = Tag
|
model = Tag
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue