I have the following admin setup so that I can add/edit a user and their profile at the same time.
class ProfileInline(admin.StackedInline):
\"\"\"
Now with Django 1.7 you can use parameter min_num. You do not need class RequiredInlineFormSet anymore.
See https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.min_num
class ProfileInline(admin.StackedInline):
"""
Allows profile to be added when creating user
"""
model = Profile
extra = 1
max_num = 1
min_num = 1 # new in Django 1.7
class UserProfileAdmin(admin.ModelAdmin):
"""
Options for the admin interface
"""
inlines = [ProfileInline]
...
admin.site.register(User, UserProfileAdmin)