Attention une mise à jour du service Gitlab va être effectuée le mardi 14 décembre entre 13h30 et 14h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

Commit 19101e9b authored by BERJON Matthieu's avatar BERJON Matthieu
Browse files

Update of the admin view



I updated the admin view in order to show the fields given in the
allgo_user table in the user administration system.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent 5cff082c
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User
# Register your models here.
from poc.models import AllgoUser
# Define an inline admin descriptor for Employee model
# which acts a bit like a singleton
class AllgoUserInline(admin.StackedInline):
model = AllgoUser
can_delete = False
verbose_name_plural = 'allgo users'
# Define a new User admin
class UserAdmin(BaseUserAdmin):
inlines = (AllgoUserInline, )
# Re-register UserAdmin
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment