~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlscreens/admin.py

  • Committer: franku
  • Date: 2016-12-13 18:28:51 UTC
  • mto: This revision was merged to the branch mainline in revision 443.
  • Revision ID: somal@arcor.de-20161213182851-bo5ebf8pdvw5beua
run the script

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
from models import Category, Screenshot
5
5
from django.contrib import admin
6
6
 
 
7
 
7
8
class CategoryAdmin(admin.ModelAdmin):
8
9
    prepopulated_fields = {'slug': ('name',)}
9
 
    search_fields = [ "name" ]
10
 
    list_display = ["name" ]
 
10
    search_fields = ['name']
 
11
    list_display = ['name']
11
12
 
12
13
admin.site.register(Category, CategoryAdmin)
13
14
 
 
15
 
14
16
class ScreenshotAdmin(admin.ModelAdmin):
15
 
    search_fields = ["name"]
16
 
    list_filter = ["category"]
 
17
    search_fields = ['name']
 
18
    list_filter = ['category']
17
19
 
18
20
admin.site.register(Screenshot, ScreenshotAdmin)
19