I use django-registrations and while I add this code in my admin.py
from django.contrib import adminfrom customer.models import Customerfrom .models import UserProfilefrom django.contrib.auth.admin import UserAdminfrom django.contrib.auth import get_user_modelclass UserProfileInline(admin.StackedInline):model = UserProfilecan_delete = Falseclass UserProfileAdmin(UserAdmin):inlines=(UserProfileInline, )admin.site.unregister(get_user_model())admin.site.register(get_user_model(), UserProfileAdmin)admin.site.register(Customer)
I receive an error:
" cannot import name get_user_model "
in admin.py
what am I doing wrong?