working with forms , problem !!!

2011-12-11 Thread Hassan
Dear All , am trying to make a form and i used an example from the book but its not working , dont know why ? this is what i have : models.py : from django.db import models from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message

Re: working with forms , problem !!!

2011-12-11 Thread Mario Gudelj
Try using this: d = {'form':form} d.update(csrf(request)) return render_to_response('contact.html',d) Tip: don't use !!! or ??? in your emails when asking for help :) On 12 December 2011 08:30, Hassan wrote: > Dear All , > am trying to make a form and i used an example from the book but its

Re: working with forms , problem !!!

2011-12-12 Thread Alagappan
Adding the csrf context processor would fix it. Refer to https://docs.djangoproject.com/en/dev/ref/contrib/csrf/ for more details. As suggested, you can add your own render_to_response() wrapper, if you are likely to use it often. -- *Regards,* *Alagappan Ramu (http://alagappan.co.in) * -- You