title: Middleware Setup
body: <p>I am trying to setup a message middleware for my marketing app,but the method process_request is not returning anything.
  it is running without errors still though not returning message requests.</p>
  
  <p>my middleware.py---</p>
  
  <pre><code>from .models import MarketingMessage
  
  class DisplayMarketing():
      def __init__(self, get_response):
          self.get_response = get_response
      def __call__(self, request):
          def process_request(request):
              print("something")
              try:
                  request.session['marketing_message'] = MarketingMessage.objects.all()[0].message
              except:
                  request.session['marketing_message']  = False
          response = self.get_response(request)
          return response
  </code></pre>
  
  <p>my settings.py</p>
  
  <pre><code>MIDDLEWARE = [
      'django.middleware.security.SecurityMiddleware',
      'django.contrib.sessions.middleware.SessionMiddleware',
      'django.middleware.common.CommonMiddleware',
      'django.middleware.csrf.CsrfViewMiddleware',
      'django.contrib.auth.middleware.AuthenticationMiddleware',
      'django.contrib.messages.middleware.MessageMiddleware',
      'django.middleware.clickjacking.XFrameOptionsMiddleware',
      'marketing.middleware.DisplayMarketing',
  ]
  </code></pre>