~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlscreens/admin.py

  • Committer: Holger Rapp
  • Date: 2009-02-21 18:24:02 UTC
  • Revision ID: sirver@kallisto.local-20090221182402-k3tuf5c4gjwslbjf
Main Page contains now the same informations as before

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
 
 
8
 
class CategoryAdmin(admin.ModelAdmin):
9
 
    prepopulated_fields = {'slug': ('name',)}
10
 
    search_fields = ['name']
11
 
    list_display = ['name']
12
 
 
13
 
admin.site.register(Category, CategoryAdmin)
14
 
 
15
 
 
16
 
class ScreenshotAdmin(admin.ModelAdmin):
17
 
    search_fields = ['name']
18
 
    list_filter = ['category']
19
 
 
20
 
admin.site.register(Screenshot, ScreenshotAdmin)