text: # This file is covered by the BSD license. See LICENSE in the root directory.
  from django.contrib import admin
  from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
  from django.contrib.auth.models import User
  
  from accounts.models import UserProfile
  
  
  class UserProfileInline(admin.StackedInline):
      model = UserProfile
      can_delete = False
      verbose_name_plural = 'profile'
  
  
  class UserAdmin(BaseUserAdmin):
      inlines = (UserProfileInline,)
  
  
  admin.site.unregister(User)
  admin.site.register(User, UserAdmin)
  