Django 1.8导入问题

时间:2018-04-30 08:30:17

标签: django python-2.7

这是我第一次需要在目录结构中更深入地运行我的应用程序,我显然搞砸了我的应用程序结构,同时设置它并且不能再正确了。有人可以帮帮我吗?

在我的start.sh文件中,我定义了以下env vars:

Traceback (most recent call last):
  File "[PATH_REMOVED]", line 46, in <module>
    APP.run()
  File "[PATH_REMOVED]", line 22, in run
    self.worker.start()
  File "E:\Programs\Python 3.x\lib\multiprocessing\process.py", line 105, in start
    self._popen = self._Popen(self)
  File "E:\Programs\Python 3.x\lib\multiprocessing\context.py", line 223, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "E:\Programs\Python 3.x\lib\multiprocessing\context.py", line 322, in _Popen
    return Popen(process_obj)
  File "E:\Programs\Python 3.x\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__
    reduction.dump(process_obj, to_child)
  File "E:\Programs\Python 3.x\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: can't pickle module objects
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "E:\Programs\Python 3.x\lib\multiprocessing\spawn.py", line 99, in spawn_main
    new_handle = reduction.steal_handle(parent_pid, pipe_handle)
  File "E:\Programs\Python 3.x\lib\multiprocessing\reduction.py", line 87, in steal_handle
    _winapi.DUPLICATE_SAME_ACCESS | _winapi.DUPLICATE_CLOSE_SOURCE)
PermissionError: [WinError 5] Access is denied

我的目录结构如下:

export PYTHONPATH=${PYTHONPATH}:'/home/ubuntu/workspace/skw/3rd_apps/'
export PYTHONPATH=${PYTHONPATH}:'/home/ubuntu/workspace/skw/cskw/'

我在两个错误之间循环: 1.尝试设置自定义注册表单时:

/home/ubuntu/workspace/skw/start.sh (also manage.py and gulpfile)
/home/ubuntu/workspace/skw/3rd_apps/ (django is here)
/home/ubuntu/workspace/skw/cskw/ (contains __init__.py)
/home/ubuntu/workspace/skw/cskw/apps/ (contains __init__.py)
/home/ubuntu/workspace/skw/cskw/core_app/ (settings.py is here and __init__.py)

表单已到位,但我收到此错误:

ACCOUNT_SIGNUP_FORM_CLASS = 'core_app.forms.SignupForm'
  1. 如果我修复此问题,我无法从应用程序导入任何内容,它希望它们位于core_app中,并且看不到应用程序模块与core_app处于同一级别。
  2. manage.py指向&#34; core_app.settings&#34;,settings.py中的变量也是如此。

0 个答案:

没有答案