Создаю сайт на джанго.
Хочу, чтобы он был на русском!
Но, когда пишу в html кириллицу, он выдает UnicodeDecodeError.
Джанго 1.11.15, питон 3.6
Помогите, пожалуйста!
Текст ошибки:
Internal Server Error: /
Traceback (most recent call last):
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\core\handlers\exception.py", line 41, in inner
response = get_response(request)
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\core\handlers\base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\core\handlers\base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "C:\Users\Alex\django_mysite\mainApp\views.py", line 4, in index
return render(request, 'mainApp/homePage.html')
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\shortcuts.py", line 30, in render
content = loader.render_to_string(template_name, context, request, using=using)
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\template\loader.py", line 67, in render_to_string
template = get_template(template_name, using=using)
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\template\loader.py", line 21, in get_template
return engine.get_template(template_name)
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\template\backends\django.py", line 39, in get_template
return Template(self.engine.get_template(template_name), self)
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\template\engine.py", line 162, in get_template
template, origin = self.find_template(template_name)
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\template\engine.py", line 136, in find_template
name, template_dirs=dirs, skip=skip,
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\template\loaders\base.py", line 38, in get_template
contents = self.get_contents(origin)
File "C:\Users\Alex\django_mysite\myvenv\lib\site-packages\django\template\loaders\filesystem.py", line 29, in get_contents
return fp.read()
File "C:\Users\Alex\AppData\Local\Programs\Python\Python36\lib\codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 64: invalid continuation byte
[31/Aug/2018 10:42:08] "GET / HTTP/1.1" 500 105186