Thanks Malcolm. > Define "didn't seem to work"? > ... > Have a look in django/templates/defaulttags.py for examples of argument > parsing in the built in tags for Django.
I'm sure it was a gap in my knowledge, since you're obviously right about the built-in tags. I'll take a look at them. I was doing something like this in the tag's associated Node: --- t = get_template("path/to/template.html") c = Context({"forms": [form1, form2]}) return t.render(c) --- But I couldn't seem to get anything returned. As I say -- gap in my knowledge. I've never tried doing templates "manually" like that. > What problem are you trying to solve here? > ... > When you're *using* Context, though, the > implementation details aren't relevant. You just treat it as a > dictionary and you'll be given the most locally scoped value for the key > you request. I had assumed as such when I started. If I recall, the problem I ran into treating Context like a dictionary was with this code: --- forms = [] for key, value in context.items(): if key == "form" or key.endswith("_form"): forms.append(value) --- I tried "context.iteritems()" and just plain "context" but as I recall all three errored ("RequestContext' object has no attribute 'items'", RequestContext' object has no attribute 'iteritems'" and "need more than 1 value to unpack", respectively). Regards Scott --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---