title: Adding headers to django CBV
body: <p>I want to add a <code>X-Frame-Options</code> header to Django CreateView. I need this because I'll be serving a form that will be loaded in iframe tags.</p>
  
  <p>The problem is, there are several methods in django class-based views that return HttpResponse objects.
  Is there a way to add the header to the responses without overwriting <strong>all</strong> those methods?</p>
  
  <pre><code>class MyView(CreateView):
      def get(self, request, *args, **kwargs):
          resp = super(MyView, self).get(request, *args, **kwargs)
          resp['X-Frame-Options'] = ''
          return resp
      # Same would go for form_invalid, post, put, etc...
  </code></pre>