Thanks for advice!

On Oct 4, 2009 9:23 PM, "AmanKow" <wwer...@si.rr.com> wrote:

> custom tag is a function  - cant you just assing its return in view > into
variable and send this...
The usual way to go about this would be to modify your tag to take an
optional "as var_name".  When the tag has the optional portion, you
would update the value into the variable.  This way, behavior does not
change where you're using the returned value, and when you need the
value for further processing, you put it into a name of your choice in
the context.  The tag documentation has plenty of information about
writing tags which access the context:

http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#setting-a-variable-in-the-context

--~--~---------~--~----~------------~-------~--~----~ You received this
message because you are sub...

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