Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contact page not working #26

Open
piyushparkash opened this issue Jan 21, 2014 · 4 comments
Open

Contact page not working #26

piyushparkash opened this issue Jan 21, 2014 · 4 comments
Assignees

Comments

@piyushparkash
Copy link
Contributor

I get the following error when I visit the contact page

local variable 'form' referenced before assignment, in contact, line 1981

@ghost ghost assigned AmanjotKaur Jan 21, 2014
@sandeepmadaan
Copy link
Contributor

@AmanjotKaur Can you handle the issue or I should help?

@AmanjotKaur
Copy link
Contributor

Yes, I will help to solve this but by tomorrow.

@AmanjotKaur
Copy link
Contributor

This problem is because of from is not defined properly. Do it like
if request.method == 'POST':
form = ContactForm(request.POST)
I think you define the form just below "if" . Correct it. Indentation(of one tab) is needed before form.

@HarjotKaur
Copy link
Contributor

On Thu, Jan 23, 2014 at 10:46 PM, AmanjotKaur [email protected] wrote:

This problem is because of from is not defined properly. Do it like
if request.method == 'POST':
form = ContactForm(request.POST)
I think you define the form just below "if" . Correct it.

No, it was only an indentation problem in the line "if form_is valid".
How can a form be used before defining it?

Harjot Kaur Mann
Blog: http://harjotmann.wordpress.com/
Daily Dairy: http://harjotmann.wordpress.com/daily-diary/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants