A Django-based backend application for managing quizzes, grades, and user feedback in an educational context. The project integrates with USOS API for user authentication and provides a RESTful API interface.
- User authentication via USOS API
- Quiz management system
- Grade tracking and management
- Alert system for notifications
- Feedback collection and management
- RESTful API with JWT authentication
- API documentation using DRF Spectacular
- CORS support for frontend integration
- Python 3.x
- Django 5.1.6
- Django REST Framework 3.15.2
- PostgreSQL (production) / SQLite (development)
- JWT Authentication
- USOS API Integration
- Gunicorn (production server)
- WhiteNoise (static files)
- Python 3.x
- pip (Python package manager)
- PostgreSQL (for production)
- USOS API credentials
- Clone the repository:
git clone <repository-url>
cd testownik_core
- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file in the project root with the following variables:
SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
CORS_ALLOWED_ORIGINS=http://localhost:5173
CSRF_TRUSTED_ORIGINS=http://localhost:8000
# Database settings (for production)
DB_ENGINE=django.db.backends.postgresql
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_HOST=localhost
DB_PORT=5432
# Email settings
EMAIL_HOST=your-smtp-server
EMAIL_USE_TLS=True
EMAIL_PORT=587
EMAIL_HOST_USER=your-email
EMAIL_HOST_PASSWORD=your-password
DEFAULT_FROM_EMAIL=Testownik Solvro <testownik@solvro.pl>
- Run migrations:
python manage.py migrate
- Create a superuser (optional):
python manage.py createsuperuser
- Run the development server:
python manage.py runserver
alerts/
- Alert system for notificationsfeedback/
- Feedback collection and managementgrades/
- Grade tracking and managementquizzes/
- Quiz management systemusers/
- User management and authenticationtemplates/
- HTML templatestestownik_core/
- Main project configuration
The API documentation is available at /api/schema/swagger-ui/
when running the server. It provides detailed information about all available endpoints, request/response formats, and authentication requirements.
- The project uses Django REST Framework for API development
- JWT authentication is implemented for secure API access
- CORS is configured to allow frontend integration
- Rate limiting is implemented for API protection
For production deployment:
- Set
DEBUG=False
in your environment variables - Configure a proper database (PostgreSQL recommended)
- Set up proper email settings
- Configure proper CORS and CSRF settings
- Use Gunicorn as the production server:
gunicorn testownik_core.wsgi:application