Re: Django 1.4.3 contact_form

2013-03-05 Thread Peter Chibunna
def contact(request): if request.method == 'POST': #checks if the request method was a post, i.e. if the form has been submitted #and initializes the form with the data that was submitted form = ContactForm(request.POST) if form.is_valid(): #if form validation passed, do y

Re: Django 1.4.3 contact_form

2013-03-04 Thread william ratcliff
Check the indentation of the clause I mark with * Also, do you use tabs? def contact(request): if request.method == 'POST': form = ContactForm(request.POST) if form.is_valid(): asunto = form.cleaned_data['asunto'] recado = form.cleaned_data['recad

Re: Django 1.4.3 contact_form

2013-03-04 Thread Mike Dewhirst
On 5/03/2013 2:05pm, Ana Molf wrote: I canīš€ solve the follow error The error message says you have an indentation error. That means you need to make sure to have exactly the same quantity of indentation each time the source code gets indented. In practice, most people use four spaces and ne