~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to news/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
from django.contrib import admin
 
2
from widelands.news.models import *
 
3
 
 
4
 
 
5
class CategoryAdmin(admin.ModelAdmin):
 
6
    prepopulated_fields = {'slug': ('title',)}
 
7
 
 
8
admin.site.register(Category, CategoryAdmin)
 
9
 
 
10
 
 
11
class PostAdmin(admin.ModelAdmin):
 
12
    list_display  = ('title', 'publish', 'status')
 
13
    list_filter   = ('publish', 'categories', 'status')
 
14
    search_fields = ('title', 'body')
 
15
    prepopulated_fields = {'slug': ('title',)}
 
16
 
 
17
admin.site.register(Post, PostAdmin)