Quiz application backend built with Django. Mostly built to try out Django following a good experience using Flask.
- Create quizzes
- Add questions to quizzes
-
Add time limits to quizzes and or individual questions -
See results at the end of a quiz -
See stats for questions in a quiz to see how other users are doing -
Detailed view of your own stats - Categorize quizzes
- Search for quizzes in a public database
-
Create private quizzes with a shareable link - Setup loading of keys from environment variables
These setup instructions assume you already have Python and virtualenv installed.
The following will clone this repository, setup and activate a virtual environment, and install dependencies.
git clone https://github.com/NeedsSoySauce/testme.git
cd .\testme\
virtualenv .virtualenv
.\.virtualenv\Scripts\activate
pip install -r requirements.txt
git clone https://github.com/NeedsSoySauce/testme.git
cd .\testme\
virtualenv .virtualenv
source .\.virtualenv\Scripts\activate
pip install -r requirements.txt
This will initialize a local sqlite3 database for development and testing.
python manage.py migrate
The following will bring up a prompt where you can enter a username and password.
python manage.py createsuperuser
The .env file at the project's root contains the following Django settings. Check the Django documentation for an explanation on what they do.
DEBUG
SECRET_KEY
TIME_ZONE
LANGUAGE_CODE
To start a development server:
python manage.py runserver
This project uses Django's default testing suite unittest
. Experience with it so far suggests moving to pytest
could be worthwhile.
To run tests:
python manage.py test