title: Django - TemplateView and POST
body: <p>I have a page generated by a TemplateView and containing a POST form.
  How can I use this form with a TemplateView.</p>
  
  <p>There is an example similar of my code :</p>
  
  <pre><code>class ProjetMixin(object) :
  
      ...
  
      def get_context_data(self, **kwargs) :
          ...
          return context
  
  
  class AView(ProjetMixin, TemplateView):
      template_name = 'path-to-the-page.html'
  
      offre = None
  
      def get_context_data(self, **kwargs) :
  
          context = super(AView, self).get_context_data(**kwargs)
  
          try :   
              self.offre = self.projet.offredeprojet
          except OffreDeProjet.DoesNotExist :
              self.offre = None   
  
          if self.request.user.is_authenticated() :               
                  print(" method = ",self.request.method) //display "GET"
                  if self.request.method == "POST" :
                      print("post")
  
          context['offre'] = self.offre
  
          return context
  </code></pre>
  
  <p>So it's normal that the only method is GET but how can I use POST ?</p>
  
  <p>I have this error when I submit the form :</p>
  
  <pre><code>Method Not Allowed (POST): /projets/pseudoaz/recrutement
  [2017/07/01 11:50:57] HTTP POST /projets/pseudoaz/recrutement 405 [0.06, 127.0.0.1:57560]
  </code></pre>
  
  <p>Thank you</p>