Hi !

It's very strange, i just found a way to solve my probleme but i don't have
'django.core.context_processors.request' in my TEMPLATE_CONTEXT_PROCESSORS.

For solve my problem i added in my views.py :
from django.shortcuts import render_to_response

this is my previous index views who didn t work :

 def index(request):
     videos = Video.objects.all()
     t = loader.get_template('myFront/index.html')
     c = Context({
         'datas': datas,
     })
     return HttpResponse(t.render(c))

and this is the solving one :
 def index(request):
     videos = Video.objects.all()
     t = loader.get_template('myFront/index.html')
     c = Context({
         'datas': datas,
     })

     return render_to_response('empireFront/index.html', c,
context_instance=RequestContext(request))

Is a a correct way to do in Django ?

I'ill try your solution too,

Thx :)





On Tue, Jul 12, 2011 at 12:33 PM, Kenneth Gonsalves
<law...@thenilgiris.com>wrote:

> On Mon, 2011-07-11 at 23:31 -0700, Suprnaturall wrote:
> > The problem is : when i m in login.html i see my user.username, but
> > when i submit the login form and being redirect to index i don t
> > retrieve the user.username.
>
> do you have this in your settings.py:
>
> TEMPLATE_CONTEXT_PROCESSORS = (
>    'django.core.context_processors.request',
>        ...
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
> --
> 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.
>
>

-- 
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.

Reply via email to