Re: Why I don't access the {{ user }} variable in template?

2015-03-23 Thread Fellipe Henrique
I found the problem, I was create a custom template context processor, and
for some reason I choose one name that override some function in one os 3rd
apps I'm using... I change the name of my custom context processor, and
works Fine!

Thanks again

T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*

e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
*Blog: http://fhbash.wordpress.com/ *
*GitHub: https://github.com/fellipeh *
*Twitter: @fh_bash*

On Mon, Mar 23, 2015 at 12:07 PM, Daniel Roseman 
wrote:

> On Monday, 23 March 2015 14:16:00 UTC, Fellipe Henrique wrote:
>>
>> Hello,
>>
>> I have this settings.py [1], and my CustomUser [2]
>>
>> When I try to use in my template:
>>
>> {{ user_first_name }}
>>
>> don't show anything... What I miss in these code?
>>
>>
> You should show your view. Are you using a RequestContext?
> --
> DR.
>
> --
> 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+unsubscr...@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/1e057e9f-8ee7-4c08-90f7-dfabd6e72818%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+unsubscr...@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/CAF1jwZFEQ7AN-Nm%2Bur3oYkeS1ue%3D3YtBYn6Hr4aQGwoCOcPYXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why I don't access the {{ user }} variable in template?

2015-03-23 Thread Daniel Roseman
On Monday, 23 March 2015 14:16:00 UTC, Fellipe Henrique wrote:
>
> Hello,
>
> I have this settings.py [1], and my CustomUser [2]
>
> When I try to use in my template:
>
> {{ user_first_name }} 
>
> don't show anything... What I miss in these code?
>
>  
You should show your view. Are you using a RequestContext? 
--
DR.

-- 
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+unsubscr...@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/1e057e9f-8ee7-4c08-90f7-dfabd6e72818%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why I don't access the {{ user }} variable in template?

2015-03-23 Thread Fellipe Henrique
Yes, I have django.contrib.auth.context_processors.auth in my Tamplate
processor: here is my template processor:

TEMPLATE_CONTEXT_PROCESSORS ('django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.media',
'django.core.context_processors.static', 'django.core.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'django.core.context_processors.request',
'core.context_processor.default_proc',
'social.apps.django_app.context_processors.backends',
'social.apps.django_app.context_processors.login_redirect')



sorry, in my template I use this:
   
{{ user.first_name }} {{ user.last_name }} 




T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*

e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
*Blog: http://fhbash.wordpress.com/ *
*GitHub: https://github.com/fellipeh *
*Twitter: @fh_bash*

On Mon, Mar 23, 2015 at 11:21 AM, aRkadeFR  wrote:

>  Do you have 'django.contrib.auth.context_processors.auth' in
> your context template processor?
>
> {{ user_first_name }} won't work anyway cause the variable
> set by the context_processor auth is user. To access a key
> or an attribute of a variable, the syntax is:
> {{ user.first_name }}
>
> documentation on the django template language:
> https://docs.djangoproject.com/en/1.7/ref/templates/api/
>
>
> On 03/23/2015 03:15 PM, Fellipe Henrique wrote:
>
> Hello,
>
>  I have this settings.py [1], and my CustomUser [2]
>
>  When I try to use in my template:
>
>  {{ user_first_name }}
>
>  don't show anything... What I miss in these code?
>
>  Regards,
>
>
>  [1] - https://gist.github.com/fellipeh/adbfaf06361d68650f95
>
>  [2] - https://gist.github.com/fellipeh/a0cc18f26aa9868a061f
>
>   T.·.F.·.A.·. S+F
> *Fellipe Henrique P. Soares*
>
>  e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \
> 's/(.)/chr(ord($1)-2*3)/ge'
> *Blog: http://fhbash.wordpress.com/ *
>  *GitHub: https://github.com/fellipeh *
> *Twitter: @fh_bash*
>   --
> 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+unsubscr...@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/CAF1jwZG2Qwk8n7TGT3ZcZv7FHtnm0MH7r34PkU92N0cBo1%3DgCw%40mail.gmail.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+unsubscr...@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/5510214C.4020505%40arkade.info
> 
> .
> 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+unsubscr...@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/CAF1jwZFFkppQMXTxFMVhp_E8YANwwW0pAvsW7Yw%3Dp%3DXYAnTPWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Why I don't access the {{ user }} variable in template?

2015-03-23 Thread aRkadeFR

Do you have 'django.contrib.auth.context_processors.auth' in
your context template processor?

{{ user_first_name }} won't work anyway cause the variable
set by the context_processor auth is user. To access a key
or an attribute of a variable, the syntax is:
{{ user.first_name }}

documentation on the django template language:
https://docs.djangoproject.com/en/1.7/ref/templates/api/

On 03/23/2015 03:15 PM, Fellipe Henrique wrote:

Hello,

I have this settings.py [1], and my CustomUser [2]

When I try to use in my template:

{{ user_first_name }}

don't show anything... What I miss in these code?

Regards,


[1] - https://gist.github.com/fellipeh/adbfaf06361d68650f95

[2] - https://gist.github.com/fellipeh/a0cc18f26aa9868a061f

T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*

e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 
's/(.)/chr(ord($1)-2*3)/ge'

/Blog: http://fhbash.wordpress.com//
/GitHub: https://github.com/fellipeh/
/Twitter: @fh_bash/
--
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+unsubscr...@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/CAF1jwZG2Qwk8n7TGT3ZcZv7FHtnm0MH7r34PkU92N0cBo1%3DgCw%40mail.gmail.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+unsubscr...@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/5510214C.4020505%40arkade.info.
For more options, visit https://groups.google.com/d/optout.


Why I don't access the {{ user }} variable in template?

2015-03-23 Thread Fellipe Henrique
Hello,

I have this settings.py [1], and my CustomUser [2]

When I try to use in my template:

{{ user_first_name }}

don't show anything... What I miss in these code?

Regards,


[1] - https://gist.github.com/fellipeh/adbfaf06361d68650f95

[2] - https://gist.github.com/fellipeh/a0cc18f26aa9868a061f

T.·.F.·.A.·. S+F
*Fellipe Henrique P. Soares*

e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge'
*Blog: http://fhbash.wordpress.com/ *
*GitHub: https://github.com/fellipeh *
*Twitter: @fh_bash*

-- 
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+unsubscr...@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/CAF1jwZG2Qwk8n7TGT3ZcZv7FHtnm0MH7r34PkU92N0cBo1%3DgCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.