~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlscreens/admin.py

  • Committer: Holger Rapp
  • Date: 2009-03-15 20:19:52 UTC
  • mto: This revision was merged to the branch mainline in revision 64.
  • Revision ID: sirver@kallisto.local-20090315201952-eaug9ff2ec8qx1au
Fixed a bug with broken notification support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python -tt
2
 
# encoding: utf-8
3
 
 
4
 
from models import Category, Screenshot
5
 
from django.contrib import admin
6
 
 
7
 
class CategoryAdmin(admin.ModelAdmin):
8
 
    prepopulated_fields = {'slug': ('name',)}
9
 
    search_fields = [ "name" ]
10
 
    list_display = ["name" ]
11
 
 
12
 
admin.site.register(Category, CategoryAdmin)
13
 
 
14
 
class ScreenshotAdmin(admin.ModelAdmin):
15
 
    search_fields = ["name"]
16
 
    list_filter = ["category"]
17
 
 
18
 
admin.site.register(Screenshot, ScreenshotAdmin)
19