This file provides guidance for Claude Code when working with this repository.
OTIS-WEB is a Django-based course management system for OTIS. The production server is hosted on PythonAnywhere.
- Framework: Django 5.2+
- Python: 3.13+
- Package Manager: uv
- Database: SQLite (dev), MySQL (prod)
- Type Checking: pyright
- Linting/Formatting: ruff, djlint
- Testing: pytest with pytest-django, pytest-xdist, coverage
make install # Install dependencies with uv
make runserver # Run Django development server
make migrate # Apply database migrations
make migrations # Create new migrations
make check # Run Django checks and pyright type checking
make test # Run tests with coverage
make fmt # Run code formatters (prek)Key Django apps:
core/- Core models and utilitiesdashboard/- Student dashboardroster/- Student roster managementexams/- Exam managementarch/- Problem archivepayments/- Stripe payment integrationrpg/- Achievement/gamification systemwiki/- Wiki integrationotisweb/- Main project settings
- Follow Google's Python style guide
- Use type annotations for function parameters and return types
- Run
make fmtbefore committing to auto-format code - Run
make checkto verify type checking passes
- Write tests for any new functionality in
*/tests.pyfiles - Run
make testto execute tests with coverage - Tests use pytest with the
--reuse-dbflag for speed
- Use
make migrationsto create new migrations - Use
make migrateto apply migrations - Fixtures are in
fixtures/directory; load with./fixtures/load-all.sh
- Copy
envto.envand configure as needed - Required for Stripe integration and other optional features
The codebase is heavily type-checked with pyright. Key settings:
typeCheckingMode = "basic"- Migrations and test files are excluded from type checking
- Django stubs are installed for better type inference