title: Class-based view mess about overwriting generic view methods
body: <p>I try get this to work:</p>
  
  <pre><code>url(r'^index$', Index.as_view(), name='index'),
  url(r'^index/(?P&lt;pk&gt;[0-9]+)$', Index.as_view(), name='index'),
  </code></pre>
  
  <p>I have</p>
  
  <pre><code>class Index(MyView):
  </code></pre>
  
  <p>derived from</p>
  
  <pre><code>class MyViewBase(TemplateView, DetectMobileMixin, TemplateResponseMixin, ContextMixin):
  </code></pre>
  
  <p>by default it is rendering template but i made mixin for <code>Index</code></p>
  
  <pre><code>class jsonMixin(object):
  def get(self, *args, **kwargs):
      if 'pk' in kwargs:
          if self.request.is_ajax():
              pk = kwargs['pk']
              data = self.data_json(pk)
              json_data = json.dumps(data)
              return HttpResponse(json_data,content_type='application/json')
          else:
              self.context["pokaz_element"] = self.id
      return super().get(*args, **kwargs)
  
  class Index(MyViewBase,  jsonMixin):
      ...
      def data_json():
          data = []
          ...
          return data
  </code></pre>
  
  <p>But it doesn't seems to work.
  I don't know how to bite it.</p>
  
  <p>I tried to understand how class-based-views work, what is derived from what and which function is calling <code>get</code> etc. but the manual doesn't explain this.</p>
  
  <p><strong>I really want to do this in one class</strong></p>