在django项目中使用GitHub的第三方应用程序

时间:2012-10-12 21:59:34

标签: python django github aptana

我正在尝试使用位于此处的第三方应用程序:

git://github.com/Star2Billing/django-audiofield.git

我正在使用Aptana Studio作为我的IDE。我创建了我的项目,然后我点击了项目并从github位置导入了应用程序。它看起来像是导入的。我想在开始任何实际编码之前检查它是否已正确导入,因此我执行了 manage.py validate

我收到一条消息:"No module named audiofield"。我将应用程序添加到我的已安装应用程序设置并按照安装说明进行操作

我不确定我是否输错了。另外,我在Aptana中使用virtualenv。我不确定这是否会增加问题。

请帮忙。

更新:谢谢dm0351。我做了你的建议。但是,我得到以下内容:

Traceback (most recent call last):
 File "/Users/home/Desktop/Web Development/Aptana Studio 3.0/musicproject/src/manage.py",    line 10, in <module>
execute_from_command_line(sys.argv)
 File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
utility.execute()
 File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
output = self.handle(*args, **options)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/base.py", line 371, in handle
return self.handle_noargs(**options)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/commands/validate.py", line 9, in handle_noargs
self.validate(display_num_errors=True)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/base.py", line 266, in validate
num_errors = get_validation_errors(s, app)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/core/management/validation.py", line 30, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/db/models/loading.py", line 158, in get_app_errors
self._populate()
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/db/models/loading.py", line 67, in _populate
self.load_app(app_name)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/db/models/loading.py", line 88, in load_app
models = import_module('.models', app_name)
File "/Users/home/virtualenv/venv/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/Users/home/virtualenv/venv/src/audiofield/audiofield/models.py", line 19, in <module>
from audiofield.fields import AudioField
File "/Users/home/virtualenv/venv/src/audiofield/audiofield/fields.py", line 20, in <module>
from tasks import audio_convert_task
File "/Users/home/virtualenv/venv/src/audiofield/audiofield/tasks.py", line 14, in <module>
from celery.task import Task
ImportError: No module named celery.task
Finished "/Users/home/Desktop/Web Development/Aptana Studio 3.0/musicproject/src/manage.py  validate" execution.

1 个答案:

答案 0 :(得分:1)

我相信您可以使用以下方式安装到虚拟环境中:

pip install -e URI#egg=EggName
pip install -e git+git://github.com/Star2Billing/django-audiofield.git#egg=audiofield