On 3/1/07, Jens Diemer <[EMAIL PROTECTED]> wrote:
>
> Joseph Heck schrieb:
> > Check out the docs at
> > http://www.djangoproject.com/documentation/templates_python/ for a good
> > overview. Making one is really pretty straightfoward.
>
> I don't think this is so easy :(
>
> I found this:
> https://svn.greenpeace.org/projects/custard/browser/production/trunk/melt/apps/custard/templatetags/customtags.py
>
> But i don't know how i can use this.

Yeah, I'd be careful about the license.  I don't see one.
You might contact one of these folks:
https://svn.greenpeace.org/projects/custard/browser/doc/copyright.html

But it looks like something like this would do:

x = { 'value':1, 'children': [
  { 'value': 2, 'children': []},
  {'value' : 3, 'children': [
     { 'value':4, 'children':[] }
     ]}
  ]}
----
{% recurse through children as node starting with x %}
...do something with node.
{% endrecurse %}


> Jeremy Dunck schrieb:
>  > It won't be added to Django core, AFAIK.
> Why?
> Everyone need this function, if you would like to build a sitemap with a
> tree.

No, not everyone needs this.
http://www.djangobook.com/en/beta/chapter04/#cn210

If you do, consider using Jinja with Django.  The HttpResponse just
wants a string which Jinja is (of course) capable of creating.

> I think this feature should not be missing in the core. It's a very
> useful function

As a programmer, I agree.  But the Django templating language is not
only for me, nor am I limited to the Django templating language.

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