On 30 Gru 2009, 01:26, Stodge <sto...@gmail.com> wrote:
> I need to write a custom tag. I have a hierarchy of objects that I
> want to turn into a chaptered document. But I want to be able to build
> and display the document in a template AND generate a PDF or other
> format from a view. Can I write a custom template tag and use it in a
> template and from a view?? Or is there already something like this out
> there

You could write a function that does what you need and can be used in
views,
then write template tag as an thin adaptor around this function - so
that
you can use it in templates.

--
Tomasz Zielinski
http://pyconsultant.eu

--

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