comparison build_website.py @ 2:0994ae3e4518

Fix compilation on Django 1.10+.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 07 Sep 2017 16:45:01 +0100
parents 0a1d0ab5f518
children
comparison
equal deleted inserted replaced
1:913ab5948119 2:0994ae3e4518
51 51
52 import django 52 import django
53 from django.template import Template, Context 53 from django.template import Template, Context
54 import gzip 54 import gzip
55 55
56 settings.configure(LANGUAGE_CODE=language, LOCALE_PATHS=['locale']) 56 settings.configure(LANGUAGE_CODE=language, LOCALE_PATHS=['locale'], TEMPLATES=[{'BACKEND': 'django.template.backends.django.DjangoTemplates'}])
57 57
58 django.setup() 58 django.setup()
59 59
60 with open('index.tpl.xhtml') as template_file: 60 with open('index.tpl.xhtml') as template_file:
61 template = Template(template_file.read()) 61 template = Template(template_file.read())