我正在尝试安装在github上找到的django_quiz应用程序。
https://github.com/tomwalker/django_quiz
正如您在下面所见,我已经安装了所有要求。但是没有manage.py。我如何开始和运行项目?
residual_h_to_2h[q][0:10].shape
(10, 18)
residual_h_to_2h[q][0:10][0:5].shape
(5, 18)
注意:我是Django的初学者。请帮我。我有点被困在这里。
Django版本:1.6.5
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.
答案 0 :(得分:0)
创建manage.py文件并将其存储在文件结构的顶层文件夹中。将mysite替换为包含django测验代码的文件夹。
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)
答案 1 :(得分:0)
我认为这个回购错过了一些步骤。我认为步骤应该如下:
navigate to quiz_project/quiz_project, edit setting files
navigate to quiz_project/ and copy all the apps directory ('quiz', 'multichoice',....etc) inside quiz_project along with requirement.txt file
pip install -r requirements.txt
python manage.py syncdb
python manage.py makemigrations
python manage.py migrate
python manage.py runserver