~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wlggz/admin.py

  • Committer: timo
  • Date: 2010-06-03 14:21:21 UTC
  • mto: This revision was merged to the branch mainline in revision 218.
  • Revision ID: timo@athin-20100603142121-65pr9u44g3lsmxoi
add first version of wlggz app

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python -tt
 
2
# encoding: utf-8
 
3
#
 
4
# File: wlggz/admin.py
 
5
#
 
6
# Created 2010-06-03 by Timo Wingender <timo.wingender@gmx.de>
 
7
#
 
8
# Last Modified: $Date$
 
9
#
 
10
 
 
11
from django.utils.translation import ugettext_lazy as _
 
12
from django.contrib import admin
 
13
from models import GGZAuth
 
14
 
 
15
class GGZAdmin(admin.ModelAdmin):
 
16
    list_display = ['user', 'password', 'permissions', 'lastlogin']
 
17
    list_per_page = 20
 
18
    ordering = ['-user']
 
19
    search_fields = ['user__username', 'user__first_name', 'user__last_name']
 
20
    fieldsets = (
 
21
        (None, {
 
22
                'fields': ('user', 'password', 'permissions')
 
23
                }
 
24
         ),
 
25
        )
 
26
 
 
27
admin.site.register(GGZAuth, GGZAdmin)