src/p4l/admin.py
author cavaliet
Wed, 04 Sep 2013 16:56:55 +0200
changeset 36 08cffedf6e60
parent 1 d184767fdd52
child 126 a345f1a67bf1
permissions -rw-r--r--
first step of semantic tree, just to save. it will not be used as this in this project.

from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as AuthUserAdmin
from django.utils.translation import gettext_lazy as _
from p4l.models import User
from p4l.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)