dvska / appengine-admin

Automatically exported from code.google.com/p/appengine-admin
0 stars 0 forks source link

How use use with django 1.2 #28

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I got a problem using it updating to django 1.2, here's a linke to the full 
report
http://stackoverflow.com/questions/5164684/how-to-enable-django-1-2-with-gae-and
-appengine-admin

Traceback:

Traceback (most recent call last):
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 3245, in _HandleRequest
    self._Dispatch(dispatcher, self.rfile, outfile, env_dict)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 3186, in _Dispatch
    base_env_dict=env_dict)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 531, in Dispatch
    base_env_dict=base_env_dict)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 2410, in Dispatch
    self._module_dict)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 2320, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 2216, in ExecuteOrImportScript
    exec module_code in script_module.__dict__
  File "/media/Lexar/montao/classifiedsmarket/i18n.py", line 16, in <module>
    from main import Ad
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1945, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1847, in FindAndLoadModule
    description)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1798, in LoadModuleRestricted
    description)
  File "/media/Lexar/montao/classifiedsmarket/main.py", line 18, in <module>
    import appengine_admin
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1945, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1847, in FindAndLoadModule
    description)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1798, in LoadModuleRestricted
    description)
  File "/media/Lexar/montao/classifiedsmarket/appengine_admin/__init__.py", line 1, in <module>
    from .views import Admin
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1945, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1847, in FindAndLoadModule
    description)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1295, in Decorate
    return func(self, *args, **kwargs)
  File "/media/Lexar/montao/google/appengine/tools/dev_appserver.py", line 1798, in LoadModuleRestricted
    description)
  File "/media/Lexar/montao/classifiedsmarket/appengine_admin/views.py", line 19, in <module>
    from . import authorized
ImportError: cannot import name authorized

Original issue reported on code.google.com by nikla...@gmail.com on 2 Mar 2011 at 7:47

GoogleCodeExporter commented 9 years ago
Please post the full report here with instructions about how to reproduce the 
error.

Original comment by valdiic on 2 Mar 2011 at 8:52

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I added

import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from google.appengine.dist import use_library
use_library('django', '1.2')

in 
http://code.google.com/p/appengine-admin/source/browse/appengine_admin_test_proj
ect/urls.py

Seems to be fine after fixing  issue #21 

Original comment by valdiic on 2 Mar 2011 at 9:33

GoogleCodeExporter commented 9 years ago
Thank you valdiic

Original comment by nikla...@gmail.com on 2 Mar 2011 at 10:38