About Dynamic Admin Inline Extras
Django inlines have a parameter extra
which defines how many empty inline forms to show below the main form.
You can define the parameter dynamically using get_extra()
method:
1 2 3 4 5 |
|
In our example, one empty inline Attachment form will be shown if no attachments exist yet.
Tips and Tricks Programming Django 4.2 Django 3.2 Django 2.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.