~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wlmaps/admin.py

  • Committer: Holger Rapp
  • Date: 2009-04-04 14:32:27 UTC
  • Revision ID: sirver@kallisto.local-20090404143227-mf49s08keq3nv08c
Initital (unusable) version of wlmaps application

Show diffs side-by-side

added added

removed removed

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