Reputation: 75
Is it possible to create pages and import data programatically? For example with data stored in a csv. I think django has some kind of bulk_import but I don't know how to do it with Wagtail.
I have a model where the Page has an InlinePanel to an Orderable class.
Upvotes: 0
Views: 348
Reputation: 2919
I don't think there is a write api for Wagtail but why can't you use the built-in django managment scripts?
Eli Bendersky has provided a quick overview of how to create custom managment scripts.
Alternatively, if you're just loading in data, why don't you just do a read_csv and loop in through python? Erin Mullaney has a quick primer on how to do this as well.
The Crux of this will be writing a quick function that extends the Page class in wagtail.
Upvotes: 1