title: Calling a class-based view of an app from another app in same project
body: <p>I have this class based view:</p>
  
  <pre><code>class Browse(APIView):
  '''
  Browse associations
  
  '''
  permission_classes = [TokenHasReadWriteScope]
  
  def get(self,request,format=None):
      reply={}
      status=200
  
  
      try:
          filter_options={}
          name=request.query_params.get('name','').strip()
          if name:
              filter_options['name__icontains']=name
  
  
          associations=Association.objects.filter(**filter_options)values('id','name')
          page=request.query_params.get('page',1)
          paginator=Paginator(associations,20)
          data=paginator.page(page)
      except PageNotAnInteger:
          data=paginator.page(1)
      except EmptyPage:
          data=paginator.page(paginator.num_pages)
  
      except:
          status=400
          reply['detail']=(_('ErrorProcessingRequest'))
  
      if status==200:
          reply['associations']=list(data)
          reply['total_num_of_pages']=paginator.num_pages
          reply['total_rows_found']=paginator.count
  
      return JsonResponse(reply,status=status)
  </code></pre>
  
  <p>Now I have another app that is oriented towards internal users (different login and all) but I want to list the associations still. The above code is short and i don't mind pasting it there but just wondering if I can avoid DRY by calling the Browse from views.py of another app.</p>
  
  <p>Currently, I trie this from app 2:</p>
  
  <pre><code>      from app1.views import Browse
        b=Browse()
        #but I cant serialize it as it returns &lt;app1.views.Browse object at 0x0000000006CE0E80&gt; is not JSON serializable
  </code></pre>