A web-based quiz application built with Django and MySQL.
This application allows users to take quizzes through a web interface. It features an admin panel for quiz management and a user-friendly interface for quiz-takers.
- Python 3.x
- MySQL
- pip (Python package manager)
# Create virtual environment
python -m venv myenv
# Activate virtual environment
source myenv/bin/activate # On Linux/Mac
# or
myenv\Scripts\activate # On Windows
CREATE DATABASE dbquizz;
pip install -r requirements.txt
Navigate to backend/backend/settings.py
and update the DATABASES
configuration with your MySQL credentials:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'dbquizz',
'USER': 'root',
'PASSWORD': 'your_password_here',
'HOST': 'localhost',
'PORT': '3306',
}
}
python manange.py migrate
python manage.py populate_quiz
python manage.py createsuperuser
- Start the development server:
python manage.py runserver
- Access the application:
- Quiz Interface: http://localhost:8000/quizz/
- Admin Panel: http://localhost:8000/admin/
backend/
├── backend/
│ ├── __init__.py
│ ├── settings.py
│ └── ...
└── ...
- Make sure MySQL server is running before starting the application
- Keep your virtual environment activated while working on the project
- Ensure all required ports are available (especially 8000 for Django and 3306 for MySQL)