# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User from django.db import models from .models import UserProfile # enables editing the user profile in the Django admin class UserProfileInline(admin.StackedInline): model = UserProfile can_delete = False class UserAdmin(UserAdmin): inlines = (UserProfileInline,) admin.site.unregister(User) admin.site.register(User, UserAdmin)