KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Assuming I have a context processor: def title(request): return {'titles': 'mytitle'} I can access this variable in template as {{ titles }} . But how can I do so in a view? def myview(request): print request.titles doesn't seem to work - 'WSGIRequest' object has no attribute 'titles' Or maybe there is a better approach (than context processors) to have global variables accessible in both views and templates? Thanks in advance.
Tags (comma-separated)
Save Edits
Cancel