Hi Niklas, I'm not certain, but you might find that the default template tag, widthratio already does what you need: http://www.djangoproject.com/documentation/templates/#widthratio
The example shows how it can be used to create bar-charts etc. (to display percentage complete). Otherwise, yes your custom template can access the variable's value. You can look at the source of the widthratio tag to see how it's done there (django_src/django/templates/defaulttags.py). -Michael On Oct 3, 4:07 am, "niklas.voss" <[EMAIL PROTECTED]> wrote: > I have a Problem and can't find anything about it, that helps me... > > I integrated a self-made templatetag into django and it works well. > this tag just generate a percent bar. > There is only one argument which is given to the function, it is the > percentage status, but i dont want a static percentage by giving > everytime the page loads the same argument, instead of this there > shoud be a variable, which shows the user his status. > > So in code it should look like this: > If user is my argument that was given to render_to_response, i want to > give the function the submodel status of user; like this: > {{ percentbar user.status }} > > Is there a way to give this variable to the percentbar function in the > template? > Or should I do it through the views.py... > > I hope you understood my problem, because my english is very bad :) > > Niklas Voss --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---