Form should be provided in context render of index view . Try this please
and let me know if it worked
On Sunday, June 9, 2019, Marvelous Ikechi wrote:
> I couldn't find a description field in the creation of your ContactForm.
> Maybe it's an oversight from me. However, if it isn't, I'm not expe
I couldn't find a description field in the creation of your ContactForm.
Maybe it's an oversight from me. However, if it isn't, I'm not expecting to
see a {{card.description}} in your cards.html page.
On 12:30PM, Fri, Jun 7, 2019 Delcy John wrote:
> i think the error is in form.py,you must put i
i think the error is in form.py,you must put indentation in class
On Fri, Jun 7, 2019 at 9:37 AM Joe Reitman wrote:
> Interesting problem. It won't display because the form is inside a
> for-loop. Django Template language looks at variables inside a for-loop
> differently. Basically it looks for
Update.
You can do this by hard coding the HTML form in the template. If you want
to gather the data a user enters, each form will have to be uniquely
identifiable and your view will have to determine which form its getting
post data from. You can put the card index number in the button value
Interesting problem. It won't display because the form is inside a
for-loop. Django Template language looks at variables inside a for-loop
differently. Basically it looks for a collection. Since {{ form }} is not a
collection, it just ignores it.
I'm not sure how you can create multiple forms l
I've created a form in Django:
#forms.py
from django import forms
class ContactForm(forms.Form):
name = forms.CharField()
number = forms.FloatField()
eail_user = forms.EmailField()
and imported in in views.py
#views.pyfrom django.shortcuts import renderfrom .models imp
6 matches
Mail list logo