On 10/10/06, patrickk <[EMAIL PROTECTED]> wrote: > > is it possible to store the call for a templatetag in the database? > > we´re having a sidebar which consists of templatetags only. now, we´d > like the user to be able to move different sections up and down or > even delete that section. > the sidebar looks like: > > {% CommentsUser userid %} > {% TagsUser userid %} > {% OwnEntry 123 %} > {% LatestComments userid %} > {% FlickrStuff userid %} > ... > > the only way I can think of letting the user change the sidebar is to > store it in the database. > problem is, when I store a templatetag in the database, it´s being > displayed as text and not treated as a templatetag. > > any ideas? > You probably want to store a custom sidebar template for each user in the database. What you need is a template loader which pulls the correct template from the db so it can be included in the page. See ticket 632 [1] for such a loader. There was some discussion regarding that in this thread [2]. Although, I'm not sure how you would pass the current user to the loader.
[1]: http://code.djangoproject.com/ticket/632 [2]: http://groups.google.com/group/django-users/browse_thread/thread/28a15de5843711d8 -- ---- 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 -~----------~----~----~----~------~----~------~--~---