List Info

Thread: GET parameter in a template




GET parameter in a template
country flaguser name
United States
2007-10-23 03:57:29
hey

I render my template by passing a RequestContext object.
This way i
can access the user info ({{ user.username }}). I tried
displaying the
GET parameter like this: {{ get.<name of get
parameter> }} and
{{ request.get.<name of get parameter> }}. Either way
i don't get any
output. Is there even a way to display the get parameter
without
explicitly passing it in the context?

thanks for the help


Stephane


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: GET parameter in a template
country flaguser name
Australia
2007-10-23 04:49:10
On Tue, 2007-10-23 at 08:57 +0000, Rufman wrote:
> hey
> 
> I render my template by passing a RequestContext
object. This way i
> can access the user info ({{ user.username }}). I tried
displaying the
> GET parameter like this: {{ get.<name of get
parameter> }} and
> {{ request.get.<name of get parameter> }}. Either
way i don't get any
> output. Is there even a way to display the get
parameter without
> explicitly passing it in the context?

The attribute on request is called GET (all upper-case).
Django's
templating language is case-sensitive. So try
request.GET.param_name.

Regards,
Malcolm

-- 
On the other hand, you have different fingers. 
http://www.pointy-s
tick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: GET parameter in a template
country flaguser name
United States
2007-10-23 04:52:50

>
> The attribute on request is called GET (all
upper-case). Django's
> templating language is case-sensitive.

thanks!! that was the problem


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )