django - ModelForm Not Showing in Template -


for reason (excuse newbieness django) template not displaying form, have:

view

def scan(request):     form = submitdomain(request.post or none) # form bound post data      if request.method == 'post': # if form has been submitted...         if form.is_valid(): # if form input passes initial validation...             form.cleaned_data['domainnm']  ## clean data in dictionary             form.save()             return httpresponseredirect('/processing/')      else:         form = submitdomain()      return render(request, 'va/index.html', {         'form' : 'form'     }) 

i read on here use {{ form.as_p }} display <input> of form, isn't showing. glaringly preventing this?

the problem passing string form not instance of submitdomain change this:

 return render(request, 'va/index.html', {     'form' : 'form' }) 

for this:

 return render(request, 'va/index.html', {         'form' : form     }) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -