Django Multiple Choice Question
Installation
Install django-mcq
Run pip install django-mcq.
Add 'quiz' to your INSTALLED_APPS setting.
INSTALLED_APPS = (
...
'quiz',
...
)
Add the following to your projects urls.py file.
urlpatterns = [
...
path('quiz/', include('quiz.urls')),
]
Create a template quiz_base.html file in templates folder:
<!doctype html>
<html lang="en">
<head>
{% block quiz_css %}{% endblock %}
</head>
<body>
{% block quiz_body %}{% endblock %}
{% block quiz_js %}{% endblock %}
</body>
</html>
Migrate database:
python manage.py migrate
Load sample quizzes:
python manage.py loaddata sample_quizzes.json
Now login a user and navigate to http://127.0.0.1:8000/quiz/
Packaging pypi
- delete files in
distfolder - increment the version number in your
setup.pyfile $ python3 -m buildtwine upload dist/*
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-mcq-0.4.tar.gz
(98.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
django_mcq-0.4-py3-none-any.whl
(103.9 kB
view details)
File details
Details for the file django-mcq-0.4.tar.gz.
File metadata
- Download URL: django-mcq-0.4.tar.gz
- Upload date:
- Size: 98.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d167c8c92506475f7409ba41acf05dd715274a3a432a825c16c0535b7af091c
|
|
| MD5 |
5d8940d1c4975149f320348af6a664d4
|
|
| BLAKE2b-256 |
5f0e0cfbebc63c3b6788cf93758ede92083479892263e6ac743e8a7675cc83d7
|
File details
Details for the file django_mcq-0.4-py3-none-any.whl.
File metadata
- Download URL: django_mcq-0.4-py3-none-any.whl
- Upload date:
- Size: 103.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cb987942e2e4a615af5370a11ebad5938dd5f5a2fc3e07a8b7c7b8166a86ef1
|
|
| MD5 |
fdb87c67a5b6a8d2577acc3d125843d6
|
|
| BLAKE2b-256 |
695584cae084ac560a6b1e79bec523c789452bc0d33593297af72bf4c088c0d5
|