Reputation: 1634
For example, I have a Post model:
Class Post(models.Model):
title = models.Charfield(max_length=200)
# other fields
I wonder is there a way to create multiple posts at once in admin. In other words, I need a formset instead of single form on post creation page.
Upvotes: 5
Views: 6771
Reputation: 3777
Possibly, the best way to do exactly what you want is extend the ModelAdmin class
, because it has no formsets on it, except for those used on InlineFormsets.
After that you could customize the admin change_form template, to include your formsets
The quick-and-dirty way to do it using admin is wrap your Post model as an inline formset of another modeladmin and add the extra
option to it.
Upvotes: 2
Reputation: 3232
I've heard recently about a django app that exactly does this job. It's called django-bulk-admin and enables bulk add/update in the admin.
Upvotes: 7