Tuesday, September 7, 2010

home page menu view variables cross every view?

I'm Django novice and I want to have some menu (top menu) which have
some dynamically populated items. So inside home page view I have some
variables to get these menu items. But because it's top menu I need it
on every page on the site and i have about 20 views. So I'm place
these variables ( db queries) in every view on the site. It works
except on the Flatpages because I can't find a way to extend Flatpage
view with these variables. Now I have two questions:

1. How can I extend FlatPage view to get these menu variables on the
flatpages.
2. Am I miss something? What's happen with D.R.Y. if I need to place
the same variables on the every view and repeat myself 20 times?

Any advice?
Thanks

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate