waylan, although I don´t understand your last/second suggestion, I managed to store my templates in the database. if you think your second suggestion is by far better than the first one ... could you please explain it again.
my current solution: I´m storing templates for every user in the db with a name like "db/ user/31/sidebar/", where "31" is the userid. then, in my primary template (loaded from the file-system), i´m including the template from the db using {% include sidebar_template %}. that works fine, although I have to include the {% load ... %}-tag for my sidebar templatetags within the db (that´s kind of strange). thanks, patrick Am 10.10.2006 um 21:56 schrieb Waylan Limberg: > > On 10/10/06, Waylan Limberg <[EMAIL PROTECTED]> wrote: > [snip] >> Although, I'm not sure how you would pass the >> current user to the loader. > > Just rethinking my answer. I would probably go with a custom > templatetag instead. You already have the text of the sidebar template > (from your db) as a variable in your context so pass that (and perhaps > the user (or use RequestContext)) as an argument. Then, within your > tag, render the sidebar template [1], setting the context according to > the current user and return the rendered tag as a string, which will > then get displayed on your page. > > [1]: http://www.djangoproject.com/documentation/templates_python/ > #rendering-a-context > > > -- > ---- > Waylan Limberg > [EMAIL PROTECTED] > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---