无法运行django_quiz app。 manage.py找不到

时间:2016-02-28 09:11:45

标签: django django-models django-admin django-1.6 django-manage.py

我正在尝试安装在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.

2 个答案:

答案 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)

我认为这个回购错过了一些步骤。我认为步骤应该如下:

  1. pip install virtualenv(如果你确定没有任何依赖性错误,你可以跳过这一步和下一步。)
  2. virtualenv~ / quiz_env
    source~ / quiz_env / bin / activate
  3. pip install Django == 1.6.5
  4. django-admin startproject quiz_project
  5. navigate to quiz_project/quiz_project, edit setting files
  6. navigate to quiz_project/ and copy all the apps directory ('quiz', 'multichoice',....etc) inside quiz_project along with requirement.txt file
  7. pip install -r requirements.txt
  8. python manage.py syncdb
  9. python manage.py makemigrations
  10. python manage.py migrate
  11. python manage.py runserver