コード例 #1
0
 def load_template(self, template_name, template_dirs=None):
     # print 'get template: %s'%(template_name)
     template = get_template_by_pk_or_slug(template_name)
     if template:
         return DjangoTemplate(template.get_content()), template_name
         
     raise TemplateDoesNotExist("No existe template %s"%(template_name))
コード例 #2
0
ファイル: abstract.py プロジェクト: ninapavlich/django-carbon
    def get_default_template(self):

        found_template = None

        if hasattr(self, "default_template") and self.default_template:

            found_template = get_template_by_pk_or_slug(self.default_template)

        return found_template
コード例 #3
0
ファイル: abstract.py プロジェクト: ninapavlich/django-carbon
    def get_default_template(self):

        found_template = None

        if hasattr(self, 'default_template') and self.default_template:

            found_template = get_template_by_pk_or_slug(self.default_template)

        return found_template