Hi again,

Please see some questions below:

> This is the function, I'm sorry it's written in Spanish but I think
> you can understan what I'm saying
>
> def items(bloque, padre):
>                 if padre == 0:
>                         entradasMenu =
> bloque.menu_set.filter(padre__isnull = True,
> visible=True).order_by('orden')
>                 else:
>                         entradasMenu = bloque.menu_set.filter(padre =
> padre,visible=True).order_by('orden')
>                 salida=""
>                 if entradasMenu:
>                         for entrada in entradasMenu:
> (1)----->>>               salida += u"\t<li><a href='%s' title='%s'>
> %s</a>\n" %( entrada.enlace, entrada.nombre, entrada.nombre )

Where do you keep the translations for entrada.enlace, entrada.nombre,
entrada.nombre? Are they in a DB? If so, what's the model in which
they are stored? Do these menus change often? If you had the language
code available in this templatetag function, would you be able to
fetch the correct translations from the DB?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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