Hello,

I am programming a small CMS on Django, I have editable pages, now I want to add news. I have a website where I want to display these news on every page in right/left column. I have following questions:

1.) Where is the right place to place news loader? TEMPLATE_CONTEXT_PROCESSORS seems to be a good place and easy to implement. Another possibility is a middleware, I feel, that it should go there instead of TEMPLATE_CONTEXT_PROCESSORS.

2.) If I use middleware, how do I smuggle variables into templates? It has something to do with the request object, but I don't know how to use it for that thing. What should I do in a middleware to have e.g {{ news }} template variable containing last x news?

Thanks for your advices,
Martin

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@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.

Reply via email to