Django 1.8 ISAPI WSGI and IIS

58 views
Skip to first unread message

aleksandra...@gmail.com

unread,
Nov 23, 2015, 11:52:01 AM11/23/15
to Django users
Hello,

I have been trying to migrate django app from 1.6 to 1.8. All looks good on unix, When it comes to Windows, ISAPI WSGI and IIS  I am facing an issue when rendering custom login page

Traceback (most recent call last): File "c:\OMERO.server\lib\python\omeroweb\webclient\views.py", line 197, in login form = LoginForm(data=request.POST.copy()) File "c:\OMERO.server\lib\python\omeroweb\webadmin\forms.py", line 52, in __init__ super(LoginForm, self).__init__(*args, **kwargs) File "c:\OMERO.server\lib\python\omeroweb\custom_forms.py", line 35, in __init__ super(NonASCIIForm, self).__init__(*args, **kwargs) File "C:\Python27\lib\site-packages\django\forms\forms.py", line 129, in __init__ self.label_suffix = label_suffix if label_suffix is not None else _(':') File "C:\Python27\lib\site-packages\django\utils\translation\__init__.py", line 84, in ugettext return _trans.ugettext(message) File "C:\Python27\lib\site-packages\django\utils\translation\trans_real.py", line 327, in ugettext return do_translate(message, 'ugettext') File "C:\Python27\lib\site-packages\django\utils\translation\trans_real.py", line 304, in do_translate _default = _default or translation(settings.LANGUAGE_CODE) File "C:\Python27\lib\site-packages\django\utils\translation\trans_real.py", line 206, in translation _translations[language] = DjangoTranslation(language) File "C:\Python27\lib\site-packages\django\utils\translation\trans_real.py", line 116, in __init__ self._add_installed_apps_translations() File "C:\Python27\lib\site-packages\django\utils\translation\trans_real.py", line 164, in _add_installed_apps_translations "The translation infrastructure cannot be initialized before the " \nAppRegistryNotReady: The translation infrastructure cannot be initialized before the apps registry is ready. Check that you don't make non-lazy gettext calls at import time.

To deploy I use simple script: https://github.com/openmicroscopy/openmicroscopy/blob/develop/components/tools/OmeroPy/src/omero_web_iis.py

I've been trying to add django.setup() to get_wsgi_application, but that cause AboMapperCustom-6554   Error Code 0x80004005

Note that django built in development server render view just fine.

Any thoughts?
Reply all
Reply to author
Forward
0 new messages