2012-10-12 59 views
0

利用了GitHub的第三方應用程序,我想使用設在這裏第三方應用程序:在Django項目

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

我相信你可以使用安裝到您的虛擬環境:

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