code: def get_templates(self, context, template_name=None):
          " Extract parameters for `get_templates` from the context. "
          if not template_name:
              template_name = self.template_name
  
          kw = {}
          if 'object' in context:
              o = context['object']
              kw['slug'] = o.slug
  
          if context.get('content_type', False):
              ct = context['content_type']
              kw['app_label'] = ct.app_label
              kw['model_label'] = ct.model
  
          return get_templates(template_name, category=context['category'], **kwf get_templates(self, context, template_name=None):
          " Extract parameters for `get_templates` from the context. "
          if not template_name:
              template_name = self.template_name
  
          kw = {}
          if 'object' in context:
              o = context['object']
              kw['slug'] = o.slug
  
          if context.get('content_type', False):
              ct = context['content_type']
              kw['app_label'] = ct.app_label
              kw['model_label'] = ct.model
  
          return get_templates(template_name, category=context['category'], **kw)
docs: Extract parameters for `get_templates` from the context.