예제 #1
0
파일: views.py 프로젝트: 32x32/fufufuu
    def render_to_response(self, context):
        template = TEMPLATE_ENV.get_template(self.template_name)

        context['TEMPLATE_NAME'] = self.template_name.split('/')[-1].split('.')[0]
        for processor in get_standard_processors():
            context.update(processor(self.request))

        response = HttpResponse(content=template.render(**context))
        response.template_name = self.template_name
        return response
예제 #2
0
파일: models.py 프로젝트: 32x32/fufufuu
 def email_text(self):
     return TEMPLATE_ENV.get_template('report/report-manga-email.txt').render({'report': self})
예제 #3
0
파일: mixins.py 프로젝트: 32x32/fufufuu
 def info_text(self):
     return TEMPLATE_ENV.get_template('manga/manga-archive-info.txt').render({'manga': self})