django support ('module' object has no attribute '_config_handle')

Asked by amre

I was trying to deploy a very simple django application that works on GAE but failed to run on AppScale. So I was curious if I need to set something explicitly or add some modules to enable django support?

It fails when I try to import template from google.appengine.ext.webapp to render a response.

Used latest release of appscale and appscale-tools.

Thanks,
Amre

-------------------------------------

DS_STAT 2012-03-09 23:36:12,866 apiproxy_stub.py:89] qtype GetIndices time 0.00318789482117
ERROR 2012-03-09 23:36:12,882 dev_appserver.py:4017] Exception encountered handling request
Traceback (most recent call last):
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 3935, in _HandleRequest
    self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 3863, in _Dispatch
    base_env_dict=env_dict)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 603, in Dispatch
    base_env_dict=base_env_dict)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 2982, in Dispatch
    self._module_dict)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 2871, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 2740, in ExecuteOrImportScript
    exec module_code in script_module.__dict__
  File "/var/apps/guestbook/app/main.py", line 30, in <module>
    from google.appengine.ext.webapp import util, template
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 1476, in Decorate
    return func(self, *args, **kwargs)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 2398, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 1476, in Decorate
    return func(self, *args, **kwargs)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 2287, in FindAndLoadModule
    description)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 1476, in Decorate
    return func(self, *args, **kwargs)
  File "/root/appscale/AppServer/google/appengine/tools/dev_appserver.py", line 2232, in LoadModuleRestricted
    description)
  File "/root/appscale/AppServer/google/appengine/ext/webapp/template.py", line 56, in <module>
    webapp._config_handle.django_setup()
AttributeError: 'module' object has no attribute '_config_handle'

Question information

Language:
English Edit question
Status:
Solved
For:
AppScale Edit question
Assignee:
Navraj Chohan Edit question
Solved by:
Navraj Chohan
Solved:
Last query:
Last reply:
Revision history for this message
Navraj Chohan (nchohan) said :
#1

Hello Amre,
Could you email me your application so I can try it out?

email: <email address hidden>

Thanks,
Raj

Revision history for this message
Best Navraj Chohan (nchohan) said :
#2

It seems to work for me on AppScale 1.6.
https://128.111.55.240/apps/runwithfriends
It could be that the application server on 1.5 is too old.
-Raj

On Sun, Mar 11, 2012 at 2:15 PM, Navraj Chohan <
<email address hidden>> wrote:

> Question #190353 on AppScale changed:
> https://answers.launchpad.net/appscale/+question/190353
>
> Navraj Chohan posted a new comment:
> Hello Amre,
> Could you email me your application so I can try it out?
>
> email: <email address hidden>
>
> Thanks,
> Raj
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

--
Navraj Chohan (Raj)
PhD Candidate @ UC Santa Barbara
http://cs.ucsb.edu/~nchohan
http://appscale.cs.ucsb.edu
http://nlake44.posterous.com

Revision history for this message
amre (ashakimov) said :
#3

Thanks Raj,

I've checked the code from the current trunk and it looks like AppScale 1.6 should work.

Revision history for this message
amre (ashakimov) said :
#4

Thanks Navraj Chohan, that solved my question.