Monday, November 23, 2015

Django 1.8 ISAPI WSGI and IIS

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?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c54f2112-6d61-43e9-b82d-1ae05632745c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment