Greetings..

I'm considering Django as a web framework for a new project, and am
trying to wrap my mind around how I would accomplish some things..

One of the things that I need to be able to do is to have a sort of
"macro" like ability in my templates.  I have to generate a lot of
repetitive HTML (in my case, a bunch of checkboxes).  The view method
really has no way to effectively do this in my case -- it needs to be
in the template.  (And it's just HTML generating goo, nothing fancy and
nothing that knows anything about the rest of my app)

I'd like to be able to do some sort of construct like:

gen_checkboxes(start_id, end_id)

where start_id and end_id are arguments that control how the checkboxes
are generated.

What is the most Django-ish way to do this?  From perusing the docs, it
seems like the only real option available to me is to code a custom
tag, such that the construct inside the template would be like:

{% gen_checkboxes start_id end_id %}

Is there a more lightweight solution than this, or a better way?

Thanks!

Joe


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

Reply via email to