title: Django add form on every page
body: <p>In my application i need to add a form in base.html, which I've done. For this i used context_processors, now my problem is everytime i'm trying to post, i'm getting a blank page and this error:  <code>Method Not Allowed (POST)</code></p>
  
  <p>In this form i want just to add a button where it will mark all current users notifications as read.</p>
  
  <p>I know that you can use context_processors like this:</p>
  
  <pre><code>def my_context(request):
      data = dict()
      if request.user.is_authenticated:
          data['notifications'] = Notification.objects.filter(user=request.user, read=False)
          data['form'] = NotificationForm()
          return data
  </code></pre>
  
  <p>But instead of adding the form i need these lines:</p>
  
  <pre><code>def my_context(request):
      data = dict()
      if request.user.is_authenticated:
          data['notifications'] = Notification.objects.filter(user=request.user, read=False)
      if request.method == 'POST':
          if 'read-notifications' in request.POST:
              for notification in data['notifications']:
                  notification.read = True
                  notification.save()
          next = request.POST.get('next', '/')
          return redirect(next)
      return data
  </code></pre>
  
  <p>The form in base.html:</p>
  
  <pre><code>&lt;form action="" method="POST"&gt;{% csrf_token %}
      &lt;input type="hidden" name="next" value="{{ request.path }}"&gt;
      &lt;button type="submit" class="btn m-btn--square  btn-primary" name="read-notifications"&gt;Mark as read&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>urls.py</p>
  
  <pre><code>url(r'^orders/create/$', views.admin_order_document, name='create_order'),
  url(r'^orders/waiting/$', views.OrdersWaitingListView.as_view(), name='order_waiting_list'),
  url(r'^orders/unallocated/$', views.OrdersUnallocatedListView.as_view(), name='order_unallocated_list'),
  url(r'^orders/working/$', views.OrdersWorkingListView.as_view(), name='order_working_list'),
  </code></pre>
  
  <p>How can i show this form on every page without getting the above error?</p>