admin.py 483 Bytes
Newer Older
1 2
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
3
from django.contrib.auth.forms import UserChangeForm
4 5
from .models import LDPUser

6 7 8 9 10 11 12 13
class LDPUserChangeForm(UserChangeForm):
    class Meta(UserChangeForm.Meta):
        model = LDPUser

class LDPUserAdmin(UserAdmin):
    form = LDPUserChangeForm

    fieldsets = UserAdmin.fieldsets + (
Calum Mackervoy's avatar
Calum Mackervoy committed
14
            (None, {'fields': ('slug', 'default_redirect_uri')}),
15 16 17 18
    )


admin.site.register(LDPUser, LDPUserAdmin)