src/core/admin.py
author cavaliet
Mon, 07 Oct 2013 17:35:32 +0200
changeset 139 97fc6ffa502e
parent 91 3bbf7371378a
child 334 169b7cfd1f58
permissions -rw-r--r--
debug command

from core.models import User, Notice, Term, Thesaurus
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as AuthUserAdmin
from django.utils.translation import gettext_lazy as _
from core.forms import UserChangeForm, UserCreationform

class UserAdmin(AuthUserAdmin):
    form = UserChangeForm
    add_form = UserCreationform
    fieldsets = tuple(list(AuthUserAdmin.fieldsets) + [(_('language'), {'fields':('language',)})])


admin.site.register(User, UserAdmin)

admin.site.register(Notice)
admin.site.register(Term)
admin.site.register(Thesaurus)