Tried index in module app.myApp.views. Error was: 'module' object has no attribute 'User'
| Request Method: | GET |
|---|---|
| Request URL: | http://127.0.0.1:8000/ |
| Django Version: | 1.3 |
| Exception Type: | ViewDoesNotExist |
| Exception Value: | Tried index in module empire.empireFront.views. Error was: 'module' object has no attribute 'User' |
I am out of office right now and will get back to you when I return. If you don't hear from me, my assistant should contact you shortly. I.m on sick leave because of some news from my Dr., please check out this diet product he recommended..Click Here
Enable images or click here
Let me know what you think after you have a chance to review.
Cheers!
If you no longer wish to receive emails, please unsubscribe
866-288-1880
5150 yarmouth ave, Encino, CA 91316
On Fri, 12 Aug 2011 01:37:56 -0700 (PDT), Suprnaturall wrote:
Tried index in module empire.myApp.views. Error was: 'module' object has no attribute 'User'
| Request Method: | GET |
|---|---|
| Request URL: | http://127.0.0.1:8000/ |
| Django Version: | 1.3 |
| Exception Type: | ViewDoesNotExist |
| Exception Value: | Tried index in module app.myApp.views. Error was: 'module' object has no attribute 'User' |
--To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/OeT67jgufvoJ.
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
test commentaire a2c25f76451eba14ebb762bb4ed479527416usernameFinal
any idea ?--
You received this message because you are subscribed to the Google Groups "Django users" group.
OK
> my template :
> (...)
> <form action="." method="post"> {% csrf_token %}
> <input type="text" name="commentaire" />
> <input type="hidden" name="user" value={{ user }} />
> <input type="hidden" name="article" value={{ article }} />
> <input type="hidden" name="time" value={{ now }} />
> <input type="submit" value="submit" />
> </form>
You aren't rendering your Form, you are manually outputting a form.
For one thing, this means you won't see the validation messages from
your form.
If request.method != 'POST' then you don't create the Form object
(which might explain why you were rendering by hand).
> When i submit my form i can see via the python console that i m only in the
> ELSE of the form.is_valid, and when i inspect via firebug what i submit in
> my form i have :
> commentaire test commentaire a2
> csrfmiddlewaretoken c25f76451eba14ebb762bb4ed4795274
> time 16
> user username
> vod Final
> any idea ?
> Great thx for your help :)
Find out why the form validation fails and fix it.
Look at the how the manual describes how to create a form, use it in a
view, and render it in a template. Compare and contrast this with your
view, and how you handle and render your form.
https://docs.djangoproject.com/en/1.3/topics/forms/#using-a-form-in-a-view
https://docs.djangoproject.com/en/1.3/topics/forms/#displaying-a-form-using-a-template
Cheers
Tom