if each web page has a notification of a new user (new number of messages, for example message (1)), how can I pass the variable '{new_message_count: 1}' for each view I want to use middleware:
class page_variable(): def process_request(self, request):
and the template is as follows:
<a href="/message/">new <em>({{ new_message_count }})</em></a>
variables django templates middleware response
cloudzhou
source share