English 中文(简体)
Aptana 3 (OS X)为什么在进口项目中找不到django环境模块?
原标题:Why does Aptana 3 (OS X) not find the django settings module in an imported project?

我刚刚开始从家中着手开展一个以香蕉为基础的项目。 该项目在我以窗户为基础的工作机器上运作,并在我的Mac家做部分工作。

一. 导言

python管理。 药店

我的django项目从指挥线开工。 然而,当我试图通过从业的香蕉 de/龙头接手时,我收到以下信息:

pydev debugger: starting Traceback (most recent call last): File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc/pydevd.py", line 1307, in debugger.run(setup[ file ], None, None) File "/Applications/Aptana Studio 3/plugins/org.python.pydev.debug_2.4.0.2012020116/pysrc/pydevd.py", line 1060, in run pydev_imports.execfile(file, globals, locals) #execute the script File "/Users/michael/Documents/Aptana Studio 3 Workspace/video-encoder-interface/src/VideoEncoderInterface/manage.py", line 14, in execute_manager(settings) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py", line 459, in execute_manager utility.execute() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py", line 382, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py", line 261, in fetch_command klass = load_command_class(app_name, subcommand) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/init.py", line 69, in load_command_class module = import_module( %s.management.commands.%s % (app_name, name)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module import(name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 8, in from django.core.servers.basehttp import AdminMediaHandler, run, WSGIServerException, get_internal_wsgi_application File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 26, in from django.views import static File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/views/static.py", line 95, in template_translatable = ugettext_noop(u"Index of %(directory)s") File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/translation/init.py", line 75, in gettext_noop return _trans.gettext_noop(message) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/translation/init.py", line 48, in getattr if settings.USE_I18N: File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/functional.py", line 184, in inner self._setup() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/init.py", line 42, in _setup self._wrapped = Settings(settings_module) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/conf/init.py", line 95, in init raise ImportError("Could not import settings %s (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e)) ImportError: Could not import settings video-encoder-interface.settings (Is it on sys.path?): No module named video-encoder-interface.settings

我已注意到一件可能错的事情(我不知道如何固定,最后一行指的是录像-encoder-interface)。 在我看来,它应当寻找视频EncoderInterface的场合,因为这是一揽子方案的名称(图象-encoder-interface只是香蕉项目名录的名录)。

最佳回答

Probably your PYTHONPATH is not properly set inside Eclipse/PyDev... Or maybe the settings module is not correct (right click project > propertis > pydev - django: the django settings module should be properly set there).

If you re still not able to find it out, please post a screenshot of the pydev package explorer with your project configuration, and post the contents of your manage.py file.

问题回答

暂无回答




相关问题
How to get two random records with Django

How do I get two distinct random records using Django? I ve seen questions about how to get one but I need to get two random records and they must differ.

Moving (very old) Zope/Plone Site to Django

I am ask to move data from a (now offline) site driven by Plone to a new Django site. These are the version informations I have: Zope Version (unreleased version, python 2.1.3 ) Python Version 2.1....

Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

Flexible pagination in Django

I d like to implement pagination such that I can allow the user to choose the number of records per page such as 10, 25, 50 etc. How should I go about this? Is there an app I can add onto my project ...

is it convenient to urlencode all next parameters? - django

While writing code, it is pretty common to request a page with an appended "next" query string argument. For instance, in the following template code next points back to the page the user is on: &...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

热门标签