In my application I need to build a dynamic menu. For this purpose I
have to pass a dict that contains the menu-entries that will be
displayed at my index.html
The not elegant way to do this, is to pass the menu-entries in every
view-function. What I want to do is to pass these menu-entries per
default (when a certain url is requestes), so that I dont have to do
this in every tiny view-function.
I have had several ideas to do this (but I did not succed yet):
1) urls.py
invoking a method that inserts the default values in the
request. (Here I had errors when inserting the method in
the urls.py)
2) middleware: writing a middleware-class that can do these "per-
request default-jobs"
Does anyone has an idea how to do this in an elegant way?
Thank you very much.
Toni
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---