<filename>profiles/admin.py
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from profiles.models import UserProfile


class UserProfileInline(admin.TabularInline):
    model = UserProfile


class AccountsUserAdmin(UserAdmin):
    inlines = [UserProfileInline]


admin.site.unregister(User)
admin.site.register(User, AccountsUserAdmin)

<filename>profiles/admin.py
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from profiles.models import UserProfile


class UserProfileInline(admin.TabularInline):
    model = UserProfile


class AccountsUserAdmin(UserAdmin):
    inlines = [UserProfileInline]


admin.site.unregister(User)
admin.site.register(User, AccountsUserAdmin)
