Glad you solved it :)
Cheers
On Sun, May 13, 2012 at 4:07 AM, django-user59 wrote:
> Found the problem!
>
> The urls.py was set incorrectly -
>
> changed from:
>
> url(r'^contact/$', 'demoapp.contact.views.ContactForm'),
>
> to:
>
> url(r'^contact/$', 'demoapp.contact.views.contact'),
>
Found the problem!
The urls.py was set incorrectly -
changed from:
url(r'^contact/$', 'demoapp.contact.views.ContactForm'),
to:
url(r'^contact/$', 'demoapp.contact.views.contact'),
and that makes it work.
Thanks - your hint that the object was not a HttpResponse was important one
to
Yati,
Thanks so much for a fast response.
Here is my views.py code - I thought I'm returning an instance of
HttpResponse.
from django.http import HttpResponseRedirect
from django.core.mail import send_mail
from django.shortcuts import render_to_response
from demoapp.contact.forms import Contact
My wild guess is that you're returning an instance of ContactForm in one of
your views. A view should return an HttpResponse object. Check your view
that uses this form
On Sat, May 12, 2012 at 8:21 PM, django-user59 wrote:
> Hi,
>
> I could not get the Chapter 7 "contact" form example to work. Th
Hi,
I could not get the Chapter 7 "contact" form example to work. The
public copy-paste is here: http://dpaste.com/747112/copy/
The message I get is:
AttributeError at /contact/
'ContactForm' object has no attribute 'status_code'
My ContactForm definition is as follows:
from django import form
5 matches
Mail list logo