I'm not too sure about where to put this so, there it is :
for the reservation form to work :
In "views.py", after the creation of the contact, i had to add :
contact = Contact.objects.get(email=email)
so contact is an instance instead of a querry set.
i also had to put the line
form=ContactForm
before the first "if" line.
then on "models.py", for the "album" attribute of the "Booking" class, I had to add :
on_delete = models.CASCADE
to avoid this error 1062 duplicate entry ' 1' for key "album_id
I know this was already noticed in an other issue but i don't see the modification appearing on file.
ps : I just noticed all these issues are answered later in the lesson, but as i don't go forward untill the code is actually working, i would suggest to bring those modifications earlier on, so I will still let this issue open for now.
I'm not too sure about where to put this so, there it is :
for the reservation form to work :
In "views.py", after the creation of the contact, i had to add :
contact = Contact.objects.get(email=email)so contact is an instance instead of a querry set.
i also had to put the line
form=ContactFormbefore the first "if" line.
then on "models.py", for the "album" attribute of the "Booking" class, I had to add :
on_delete = models.CASCADEto avoid this error
1062 duplicate entry ' 1' for key "album_idI know this was already noticed in an other issue but i don't see the modification appearing on file.
ps : I just noticed all these issues are answered later in the lesson, but as i don't go forward untill the code is actually working, i would suggest to bring those modifications earlier on, so I will still let this issue open for now.