Ticket #18091: 18091-startproject-non-ascii-templates.diff
File 18091-startproject-non-ascii-templates.diff, 667 bytes (added by , 13 years ago) |
---|
-
django/core/management/templates.py
diff --git a/django/core/management/templates.py b/django/core/management/templates.py index b2a1226..cf3d190 100644
a b class TemplateCommand(BaseCommand): 156 156 content = template_file.read() 157 157 if filename.endswith(extensions) or filename in extra_files: 158 158 template = Template(content) 159 content = template.render(context) 159 content = template.render(context).encode('UTF-8') 160 160 with open(new_path, 'w') as new_file: 161 161 new_file.write(content) 162 162