Peter is right, use the last snippet just if you feel the need.

On Jan 9, 2008 11:07 AM, Peter Rowell <[EMAIL PROTECTED]> wrote:
>
> On Jan 9, 12:20 am, Gaojiawang <[EMAIL PROTECTED]> wrote:
> > I want to use the local variable in template's html file.
> > like 'count = 0' and how to use it
> > How to do it?
>
> The snippet Jos� links to uses the resolve function of Django's
> templating system, which is good because it stays within the context
> created by the view and thus does not tempt a template writer to do
> arbitrary Python things in the middle of a template.
>
> However, there may be times when you want something a little more
> powerful.
>
> WARNING: If you think you need to use the following tag, think twice:
> it will probably cause you to embed knowledge about your models and/or
> business logic in your templates. This is a Bad Thing (tm).
>
> If you still feel the need, see http://www.djangosnippets.org/snippets/9/
> for arbitrary Python expressions assigned to a variable.
>
>
> >
>



-- 
Lic. Jos� M. Rodriguez Bacallao
Cupet
-----------------------------------------------------------------
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic
por profesionales
-----------------------------------------------------------------

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to