0

我打算在谷歌云平台(GAE,Cloud SQL)上运行一个 django 项目。该项目使用了几个 django 可重用应用程序(库),如 South、django-debug-toolbar、django-compressor 等。所以,我想知道是否有办法在 appengine 上管理所有这些库?如果是,如何。PS:我尝试在 app.yaml 文件中定义依赖项,但出现错误:

      Traceback (most recent call last):
  File "/usr/local/bin/dev_appserver.py", line 197, in <module>
    _run_file(__file__, globals())
  File "/usr/local/bin/dev_appserver.py", line 193, in _run_file
    execfile(script_path, globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 855, in <module>
    main()
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 848, in main
    dev_server.start(options)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 657, in start
    options.yaml_files)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 556, in __init__
    module_configuration = ModuleConfiguration(yaml_path)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 82, in __init__
    self._yaml_path)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/application_configuration.py", line 272, in _parse_configuration
    return appinfo_includes.ParseAndReturnIncludePaths(f)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/appinfo_includes.py", line 63, in ParseAndReturnIncludePaths
    appyaml = appinfo.LoadSingleAppInfo(appinfo_file)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/appinfo.py", line 1743, in LoadSingleAppInfo
    listener.Parse(app_info)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/yaml_listener.py", line 226, in Parse
    self._HandleEvents(self._GenerateEventParameters(stream, loader_class))
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/yaml_listener.py", line 177, in _HandleEvents
    raise yaml_errors.EventError(e, event_object)
google.appengine.api.yaml_errors.EventError: the library "django-appconf" is not supported
  in "jobbr/app.yaml", line 13, column 1 
4

1 回答 1

1

抱歉,但至少 South 和 django-compressor 不会在 GAE 上运行。

GAE 是一个完全不同的平台。然而,您可以通过 SQL 访问您的表,它只是非相对数据库上的一个抽象层。没有文件系统访问权限,但还有很多其他限制。甚至 Django 本身也无法在没有补丁的情况下在 GAE 上运行 - 您必须使用特殊版本django-nonrel

我建议阅读更多 GAE 文档,以便您决定是否可以在那里运行特定应用程序。

于 2013-10-06T08:52:22.837 回答