Opened 14 years ago

Last modified 14 years ago

#15174 closed

Add a required inline on django admin — at Initial Version

Reported by: zodman Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords: inlines, formset, admin
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Here more detailed info:

http://stackoverflow.com/questions/1206903/how-do-i-require-an-inline-in-the-django-admin

I propouse to use some like this:

class ProfileInline(admin.StackedInline):
    """
    Allows profile to be added when creating user
    """
    model = Profile
    extra = 1
    max_num = 1
    formset = RequiredInlineFormSet
    formset_required = True

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top