Tuesday, December 2, 2014

Re: how to pass request.user in .hbs file in django

missing the t? reques.user to request.user

On Tue, Dec 2, 2014 at 7:42 AM, JAI PRAKASH SINGH <jaiprakashsingh213@gmail.com> wrote:
hello all, 
    
i am very new to django , i have just started to work on django , 

i am using .hbs file in django project
my aim is to use request.user in .hbs file 

i am trying this ...
not working 


***********************************************view.py****************************************
data_dict = {.......
                    'user':reques.user,
                    # not working # but stacin name working like user: "jp"
                   .......}

content_type = 'application/json'
return HttpResponse(json.dumps(data_dict), content_type)


*******************************************.hbs file*****************************


 <div class="ratdefsmall"><span class="strong">{{response.user}}NO RATING</span><br></div>


************************************************************************************



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3a08e636-78ac-4342-8577-816ac25a29e9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BG_OOsDz5NJdNXGkHi8Y0gUZ1GwdSb%3DouSVPzdz68AiC27bVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment