How to implement multistep form in Django admin
My task is to provide an opportunity to fill out the form in several stages, processing the result of each step.
I found an example of what I need, but this example 2009
I know about the form, but I don't understand how to implement it in Dango admin.
I tried to do this:
def get_urls(self):
urls = super(MyCustomAdmin, self).get_urls()
my_urls = [
url(r'^my_view/$', Wizard.as_view([Form1, Form2]))
]
return my_urls + urls
But I got an error:
AttributeError at / admin / custom / custommodel / my_view /
NoneType object has no 'rsplit' attribute
Perhaps Wizard form
not the best option. But I don't know how to implement the job otherwise
+3
source to share
1 answer
I have the same requirement and I am looking at https://django-formtools.readthedocs.io/en/latest/wizard.html
The last update was in February 2017, so maybe this is relevant?
+1
source to share