0

I've installed a Django app - django_quiz into my Django project. After some problems, everything seems to be ok (no errors) except the error in template. In the django_quiz installation is written, that you have to put url(r'^q/', include('quiz.urls')), into your urls.py.

Now, I've tried to go to http://127.0.0.1:8000/q/ to see what happend but error is raised:

Exception Value:    
no such table: quiz_quiz

I didn't use third-party app yet so the solution may be obvious. What to do? How do I start to work with this quizes?

1   {% extends 'base.html' %}
2   {% load i18n %}
3   {% block title %}{% trans "All Quizzes" %}{% endblock %}
4   
5   {% block content %}
6   <h2>{% trans "List of quizzes" %}</h2>
7   

      {% if quiz_list %}



8           <table class="table table-bordered table-striped">
9   
10            <thead>
11              <tr>
12                <th>{% trans "Title" %}</th>
13                <th>{% trans "Category" %}</th>
14                <th>{% trans "Exam" %}</th>
15                <th>{% trans "Single attempt" %}</th>
16                <th></th>
17              </tr>
Milano
  • 18,048
  • 37
  • 153
  • 353

1 Answers1

-1

If you have new Django >= 1.7, You need to make migrations like this:

1) ./manage.py makemigrations django_quiz (or maybe quiz)
2) ./manage.py migrate django_quiz 

If you have Older Django

./manage.py schemamigration django_quiz
./manage.py mirgate djnago_quiz

First command will prepare migrations for database (commands to modify tables) Second command will actually make changes to DB (create tables)

Dmitry Yudin
  • 1,033
  • 1
  • 10
  • 31