Hi everyone, I tried few thigs more but it s still don't work. this is my new 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="submit" value="submit" /> </form>
And my view : def vod(request, id): article = Article.objects.get(id=id) commentaires = Commentaire.objects.filter(article=article.id ).order_by("-dateComment") c = Context({ 'article' : article, 'commentaires' : commentaires, }) # preparation du formulaire de commentaire if request.method == 'POST': form = CommentForms(request.POST) if form.is_valid(): #validation cf_comment = form.cleaned_data['commentaire'] cf_writer = request.user cf_date = datetime.datetime.now() cf_article = request.article else : form = CommentForms() return render_to_response('myApp/article.html', c, context_instance=RequestContext(request)) I still have this message : ViewDoesNotExist at / Tried index in module app.myApp.views. Error was: 'module' object has no attribute 'User' Request Method:GETRequest URL:http://127.0.0.1:8000/Django Version:1.3Exception Type:ViewDoesNotExistException Value: Tried index in module empire.empireFront.views. Error was: 'module' object has no attribute 'User' could the problem from my forms.py ? Thx On Fri, Aug 12, 2011 at 10:38 AM, <django-users@googlegroups.com> wrote: > 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<http://click22.googlegroups.com/cl/click.php?un=cHVsbHFOZA&subid=googlegroups&noimg=1&encSearch=RX9hYmplIVt2emI> > > Enable images or click > here<http://click22.googlegroups.com/cl/click.php?un=cHVsbHFOZA&subid=googlegroups&noimg=1&encSearch=RX9hYmplIVt2emI> > > <http://click22.googlegroups.com/cl/click.php?un=cHVsbHFOZA&subid=googlegroups&oc=1> > Let me know what you think after you have a chance to review. > Cheers! > > If you no longer wish to receive emails, please > unsubscribe<http://click22.googlegroups.com/cl/unsubscribe.php> > > 866-288-1880 > 5150 yarmouth ave, Encino, CA 91316 > On Fri, 12 Aug 2011 01:37:56 -0700 (PDT), Suprnaturall ** wrote: > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.