if every web page has a user new message notice(new message count, like message(1)), how can i pass variable '{ new_message_count: 1}' to every view i want to using middleware:
class page_variable():
def process_request(self, request):
# put the variable to the request or response so can used in template variable
return None
and template look like:
<a href="/message/">new <em>({{ new_message_count }})</em></a>