Thanks for the reply.

I'm working on a system that, for lack of a better term, is  "pull
based', where the designer can mix content however he/she sees fit.
In this type of a system, the developer does not assume what will be
on a page.  The designer can decide to, on a single page, pull out a
list of entries one month old,  another list of popular entries, a
list of products matching a certain criteria, a list of upcoming
events from the events module,  a list of recent polls from the poll
module, etc, and put all that on the same page.

This puts a lot of power in the hands of the designer, but I don't
think it qualifies as logic.  The designer is just saying explicitly
what content he wants,  just as if it was placed in the context.  This
kind of system is not appropriate for all applications, but for web
publishing it makes sense, and encourages better decoupling of coding
with page design.  But for certain tags to be useful, and because only
a few variables are supplied in context, some of the tags need to have
more parameters than would be necessary in a system where everything
was provided by context.

The popularity of the Expression Engine product  is, to a large
degree, due to the flexibility this type of system affords the
designer.  Users love it and rave about because of the flexibility and
comprehensiveness of the module tags.   There are no assumptions about
what needs to be on a page. The template designer does not have to ask
a developer to add to the context each time something new needs to be
put on a page.

I think you probably have to have worked with this type of tag-
centric, pull-based templating system, where the designer has a large
number of tags available from different modules,  to fully appreciate
its flexibility.

At any rate, I think Django is a marvelous system, and look forward to
continuing development with it.  I will have to work around  this
limitation, or have designers use long single line tags.

Respectfully,
--Greg

On May 4, 10:02 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Mon, May 5, 2008 at 9:38 AM, gregf <[EMAIL PROTECTED]> wrote:
>
> >  Hi,
>
> >  I would like to be able to have custom template tags span across
> >  multiple lines. The following example shows why this would be
> >  desirable for tags with lots of options:
> ...
> >  I've googled and searched the forum, but nothing turns up. Does anyone
> >  know if there's any way to do this?
>
> In short - No.
>
> Keeping tags short was an intentional design decision, specifically to
> prevent the sort of thing you are doing with that tag. Using options
> like "days=30, limit=15, categories='4,5,6,9' " looks disturbingly
> like you're putting logic into the template, which is something the
> Django template language goes to great lengths to prevent. That sort
> of element selection should be in your view, and your template tag
> should just be the rendering of everything that was selected in your
> view. Options will be necessary, but not as many as you need in your
> example.
>
> Yours,
> Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
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