class User(AbstractUser):
llcname = models.CharField('Наименование организации', max_length=50, blank=True)
llctin = models.CharField('ИНН', max_length=12, blank=True)
llccity = models.CharField('Город', max_length=30, blank=True)
llctel = models.CharField('Телефон', max_length=30, blank=True)
class UserAdmin(admin.ModelAdmin):
list_display = ('username', 'last_name', 'first_name', 'llcname', 'llctin', 'is_active')
fields = (
'username',
('last_name', 'first_name'),
('llcname', 'llctin'), ('llctel', 'llccity'),
'email', 'password',
('is_superuser', 'is_staff', 'is_active'),
('date_joined', 'last_login'),
'groups'
)
admin.site.register(User, UserAdmin)
from django.contrib.auth.admin import UserAdmin
class UserAdmin(UserAdmin):
list_display = ('username', 'last_name', 'first_name', 'llcname', 'llctin', 'is_active')
fields = (
'username',
('last_name', 'first_name'),
('llcname', 'llctin'), ('llctel', 'llccity'),
'email', 'password',
('is_superuser', 'is_staff', 'is_active'),
('date_joined', 'last_login'),
'groups'
)
admin.site.register(User, UserAdmin)