1👍
✅
After the form is successfully submitted, you are redirecting to the url named cars
. You haven’t shown this view, but the error message is telling you that you haven’t set template_name
for it. You should add something like the following.
class CarView(...):
template_name = 'cars.html'
0👍
you need to name the template where success page should show up:
url(r'^car/rent$', CarRentView.as_view(template_name="success.html"), name = 'rent'),
- Django generic views:displaying records from database
- Django: select a instance of a parent model at ModelForm
- Joining two tables django newbie qustion
- Django 1.10.6 – MP3 Upload and player
Source:stackexchange.com