Why Does Get_success_url Keep Directing Me To The Same Page? (Django)
So I am new(ish) to Django, but have been working on a project for a few months. I decided to completely restructure the project to make it take more advantage of Django's Models.
Solution 1:
From what I understand of your code, return reverse('success.html')
always point to path('success/', DeviceChoiceView.as_view(), name='success.html')
wich is your DeviceChoiceView. This would be why it's always rendering the same page uppon submit of the form. What you could do is change your success path to something like this.
path('success/', TemplateView.as_view(template_name="success.html"))
For full doccumentation on TemplateView, you can check django's doc. https://docs.djangoproject.com/en/2.1/topics/class-based-views/
Post a Comment for "Why Does Get_success_url Keep Directing Me To The Same Page? (Django)"