hodooor / Hodoor

Server side for Hodoor - Casual attendance system
GNU General Public License v3.0
8 stars 6 forks source link

Unsupported Locale settings #39

Closed patriczek2811 closed 7 years ago

patriczek2811 commented 7 years ago

I just cloned repo and install with new clear database and new superuser creation. But in administrator template attendace/administrator.html i got this error. Please take a loot to it. Without it I cant do a new frontend layout for Administrators page. I think this is perhaps bug. I tested it on two different PC's.

Thank you.

Environment:

Request Method: GET Request URL: http://127.0.0.1:8000/administrator/

Django Version: 1.9.6 Python Version: 3.5.1 Installed Applications: ['attendance', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'rest_framework', 'django_spaghetti', 'rest_framework.authtoken', 'crispy_forms', 'datetimewidget', 'functional_tests', 'debug_toolbar'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware']

Traceback:

File "C:\Python35\lib\site-packages\django\core\handlers\base.py" in get_response

  1. response = self.process_exception_by_middleware(e, request)

File "C:\Python35\lib\site-packages\django\core\handlers\base.py" in get_response

  1. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "C:\Python35\lib\site-packages\django\contrib\auth\decorators.py" in _wrapped_view

  1. return view_func(request, *args, **kwargs)

File "D:\Dropbox\hdtest\test-admin\Hodoor\attendance\views.py" in administrator

  1. locale.setlocale(locale.LC_ALL, "cs_CZ.utf-8")

File "C:\Python35\lib\locale.py" in setlocale

  1. return _setlocale(category, locale)

Exception Type: Error at /administrator/ Exception Value: unsupported locale setting

OndrejVicar commented 7 years ago

Try to call:

python3 manage.py compilemessages

It could help. Or try change localization to english.

patriczek2811 commented 7 years ago

I tried but...

CommandError: This script should be run from the Django Git checkout or your project or app tree, or with the settings module specified.

patriczek2811 commented 7 years ago

So it works well on Linux OS. Thank you Microsoft...