python - Invalid syntax error in Django form class -


syntaxerror @ / invalid syntax (forms.py, line 5) request method: post request url:    http://127.0.0.1:8000/ django version: 1.6.1 exception type: syntaxerror exception value:     invalid syntax (forms.py, line 5) exceptionlocation: c:\users\chiragbagla\desktop\skillshare\src\signups\views.py in <module>, line 5 python executable:  c:\users\chiragbagla\desktop\skillshare\scripts\python2.exe python version: 2.7.9 

a part of view.py code follows

from django.shortcuts import render, render_to_response, requestcontext  # create views here.  .forms import signupform  def home(request):  form = signupform(request.post or none)  if form.is_valid():     save_it = form.save(commit=false)     save_it.save()  return render_to_response("signup.html", locals(), context_instance=requestcontext(request)) 

a part of forms.py code follows

from django import forms  .models import signup  class signupform(forms.modelform):     class meta:         model=signup 

a part of url.py code follows

from django.conf.urls import patterns, include, url  django.contrib import admin admin.autodiscover()  urlpatterns = patterns('', # examples:  url(r'^$', 'signups.views.home', name='home'), # url(r'^blog/', include('blog.urls')),  url(r'^admin/', include(admin.site.urls)), ) 

i want display sign form on webpage have created using signup.html form not displaying on webpage of browser.

so, please tell me mistake making???

like error points out:

class meta: 

should be...

class meta: 

Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -