# Windows installation - MySQL first

1. Install Python 3.14 and MySQL 8.4+.
2. Create the database:
   - Open MySQL Workbench or MySQL command line.
   - Run `database/create_database.sql`.
3. Extract the ZIP to a folder, e.g.:
   `D:\Marthoma_School_Kalolsavam_Final`
4. Open PowerShell in that folder.
5. Run:
   `python -m venv venv`
   `.\venv\Scripts\Activate.ps1`
   `pip install -r requirements.txt`
6. Set the connection for the current PowerShell session:
   `$env:MYSQL_DATABASE="marthoma_db"`
   `$env:MYSQL_USER="root"`
   `$env:MYSQL_PASSWORD="YOUR_MYSQL_PASSWORD"`
   `$env:MYSQL_HOST="127.0.0.1"`
   `$env:MYSQL_PORT="3306"`
7. Run:
   `python manage.py makemigrations`
   `python manage.py migrate`
8. Create your first Admin User:
   `python manage.py createsuperuser`
9. Start:
   `python manage.py runserver`
10. Open:
    `http://127.0.0.1:8000/`

## Creating more users
Login as Admin and use:
Pre-Kalolsavam -> User Management

Choose:
- School User
- Result Entry User
- Admin User

For School User, select the school. The form requires the username to equal that school's code.
