Django support on Helicon ZOO

Repository of web frameworks and applications for Microsoft IIS.
User avatar
Posts: 2
Joined: 02 Nov 2014, 19:16

Django support on Helicon ZOO

02 Nov 2014, 19:30

Hello

I followed the information on the below mentioned website to deploy Django (I used 1.7 version) powered app to IIS. My goal is to make an app that would benefit from Active Directory SSO for company intranet.

http://www.helicontech.com/articles/run ... nce-tests/

I tried both Windows 7 (with IIS7.5) and Windows Server 2012 R2 (IIS8.5) and on both I got errors "django.core.exceptions.AppRegistryNotReady".

On a clean django project the error falls in translations
"The translation infrastructure cannot be initialized before the "
django.core.exceptions.AppRegistryNotReady: 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"

When I turned off all i18n stuff in settings.py I also got AppRegistryNotReady but from different source.

I tried the same but using django 1.6 and I got no errors (so far tried only clean django project).

I couldn't find information which django versions are supported. Is 1.7 not supported or my result is a matter of misconfiguration?
Is there a plan for implementing support for 1.7 version of django?

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Django support on Helicon ZOO

03 Nov 2014, 05:34

Hello,

Zoo module doesn't care about Django version at all. It actually doesn't know anything about Django as in works with Django-app as with ordinary wsgi-app. The issue is not related to Zoo. And some googling proves that:
http://stackoverflow.com/questions/2479 ... rynotready
http://stackoverflow.com/questions/2553 ... arent-load

User avatar
Posts: 2
Joined: 02 Nov 2014, 19:16

Re: Django support on Helicon ZOO

03 Nov 2014, 08:40

I still consider this can be issue with Zoo or Django on Zoo configuration. I do not get this errors when I use Apache + mod_wsgi or start a development server using manage.py.

I tried putting django.setup() in wsgi.py and manage.py file but with no result as they did in the links you have provided.


below is full log when I get an error

No handlers could be found for logger "django.request"
Traceback (most recent call last):
File "C:\Zoo\Workers\python\zoofcgi.py", line 1069, in <module>
run_django_app(options.django_settings_module, options.django_root)
File "C:\Zoo\Workers\python\zoofcgi.py", line 999, in run_django_app
FCGIServer(WSGIHandler(), app_root=django_root).run()
File "C:\Zoo\Workers\python\zoofcgi.py", line 776, in run
conn.run()
File "C:\Zoo\Workers\python\zoofcgi.py", line 569, in run
self.process_input()
File "C:\Zoo\Workers\python\zoofcgi.py", line 600, in process_input
self._do_stdin(rec)
File "C:\Zoo\Workers\python\zoofcgi.py", line 724, in _do_stdin
self._start_request(req)
File "C:\Zoo\Workers\python\zoofcgi.py", line 697, in _start_request
req.run()
File "C:\Zoo\Workers\python\zoofcgi.py", line 515, in run
protocolStatus, appStatus = self.server.handler(self)
File "C:\Zoo\Workers\python\zoofcgi.py", line 862, in handler
result = self.application(environ, start_response)
File "C:\ptt\venv\lib\site-packages\django\core\handlers\wsgi.py", line 187, in __call__
response = self.get_response(request)
File "C:\ptt\venv\lib\site-packages\django\core\handlers\base.py", line 199, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "C:\ptt\venv\lib\site-packages\django\core\handlers\base.py", line 236, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "C:\ptt\venv\lib\site-packages\django\views\debug.py", line 91, in technical_500_response
html = reporter.get_traceback_html()
File "C:\ptt\venv\lib\site-packages\django\views\debug.py", line 350, in get_traceback_html
return t.render(c)
File "C:\ptt\venv\lib\site-packages\django\template\base.py", line 148, in render
return self._render(context)
File "C:\ptt\venv\lib\site-packages\django\template\base.py", line 142, in _render
return self.nodelist.render(context)
File "C:\ptt\venv\lib\site-packages\django\template\base.py", line 844, in render
bit = self.render_node(node, context)
File "C:\ptt\venv\lib\site-packages\django\template\debug.py", line 80, in render_node
return node.render(context)
File "C:\ptt\venv\lib\site-packages\django\template\debug.py", line 90, in render
output = self.filter_expression.resolve(context)
File "C:\ptt\venv\lib\site-packages\django\template\base.py", line 624, in resolve
new_obj = func(obj, *arg_vals)
File "C:\ptt\venv\lib\site-packages\django\template\defaultfilters.py", line 769, in date
return format(value, arg)
File "C:\ptt\venv\lib\site-packages\django\utils\dateformat.py", line 343, in format
return df.format(format_string)
File "C:\ptt\venv\lib\site-packages\django\utils\dateformat.py", line 35, in format
pieces.append(force_text(getattr(self, piece)()))
File "C:\ptt\venv\lib\site-packages\django\utils\dateformat.py", line 268, in r
return self.format('D, j M Y H:i:s O')
File "C:\ptt\venv\lib\site-packages\django\utils\dateformat.py", line 35, in format
pieces.append(force_text(getattr(self, piece)()))
File "C:\ptt\venv\lib\site-packages\django\utils\encoding.py", line 85, in force_text
s = six.text_type(s)
File "C:\ptt\venv\lib\site-packages\django\utils\functional.py", line 144, in __text_cast
return func(*self.__args, **self.__kw)
File "C:\ptt\venv\lib\site-packages\django\utils\translation\__init__.py", line 83, in ugettext
return _trans.ugettext(message)
File "C:\ptt\venv\lib\site-packages\django\utils\translation\trans_real.py", line 325, in ugettext
return do_translate(message, 'ugettext')
File "C:\ptt\venv\lib\site-packages\django\utils\translation\trans_real.py", line 306, in do_translate
_default = translation(settings.LANGUAGE_CODE)
File "C:\ptt\venv\lib\site-packages\django\utils\translation\trans_real.py", line 209, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "C:\ptt\venv\lib\site-packages\django\utils\translation\trans_real.py", line 189, in _fetch
"The translation infrastructure cannot be initialized before the "
django.core.exceptions.AppRegistryNotReady: 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.

User avatar
Posts: 871
Joined: 12 Mar 2012, 09:54

Re: Django support on Helicon ZOO

03 Nov 2014, 12:29

Hello,

Please do the following steps:
- run your app without Zoo
- run Zoo Manager
- in the site tree select your app
- run console
- execute "manage.py runserver"
- it should run the server on port 8000
- go to localhost:8000
- if it works this way, but doesn't work with Zoo, then the issue is related to Zoo. Please report.

Return to Helicon Zoo

Who is online

Users browsing this forum: No registered users and 4 guests