我试图安装在github上找到的django_quiz应用程序。
正如您在下面看到的,我已经安装了所有需求。但是没有manage.py。如何启动和运行该项目?
Things I did >
Cloned the repo with git clone https://github.com/tomwalker/django_quiz.git.
Run --> pip install -r requirements.txt.
Run --> python setup.py install
Added 'quiz', 'multichoice', 'true_false', 'essay' to INSTALLED_APPS setting.
Added url(r'^q/', include('quiz.urls')), to urls.py.注:我是Django的初学者。请帮帮我。我被困在这里了。
Django版本: 1.6.5
Installed c:\python27\lib\site-packages\django_quiz_app-0.5.1-py2.7.egg
Processing dependencies for django-quiz-app==0.5.1
Searching for Pillow==2.5.0
Best match: Pillow 2.5.0
Adding Pillow 2.5.0 to easy-install.pth file
Using c:\python27\lib\site-packages
Searching for Django==1.6.5
Best match: Django 1.6.5
Adding Django 1.6.5 to easy-install.pth file
Using c:\python27\lib\site-packages
Searching for django-model-utils==2.0.3
Best match: django-model-utils 2.0.3
Adding django-model-utils 2.0.3 to easy-install.pth file
Using c:\python27\lib\site-packages
Finished processing dependencies for django-quiz-app==0.5.1
C:\Users\Vaisakhan\django_quiz>python manage.py runserver
python: can't open file 'manage.py': [Errno 2] No such file or directory发布于 2016-02-28 09:37:28
我想这次回购漏掉了一些步骤。我认为应采取以下步骤:
navigate to quiz_project/quiz_project, edit setting filesnavigate to quiz_project/ and copy all the apps directory ('quiz', 'multichoice',....etc) inside quiz_project along with requirement.txt filepip install -r requirements.txtpython manage.py syncdbpython manage.py makemigrationspython manage.py migratepython manage.py runserver发布于 2016-02-28 09:22:18
创建一个manage.py文件并将其存储在文件结构的顶部文件夹中。用保存django测试代码的文件夹替换mysite。
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mysite.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)https://stackoverflow.com/questions/35680652
复制相似问题