old_contents: from django.views.generic import list_detail
  from gallery.models import Gallery
  
  def object_listing(request):
      return list_detail.object_list(
          request,
          queryset = Gallery.permitted.all(),
          template_name = 'gallery/gallery_listing.html'
      )
  
  def object_detail(request):
      pass
  
new_contents: from content.generic.views import GenericObjectDetail, GenericObjectList 
  from gallery.models import Gallery
  
  class ObjectList(GenericObjectList):
      def get_queryset(self):
          return Gallery.permitted.all()
  
      def get_extra_context(self):
          return {'title': 'Galleries'}
  
  object_list = ObjectList()
  
  class ObjectDetail(GenericObjectDetail):
      def get_queryset(self):
          return Gallery.permitted.all()
      
      def get_extra_context(self):
          return {'title': 'Galleries'}
  
  object_detail = ObjectDetail()
  
subject: use class based views