Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 1.3 KB

File metadata and controls

57 lines (45 loc) · 1.3 KB

1. Create Virtual Environment

python -m venv venv

2. Activate Virtual Environment

# On Linux/macOS
source venv/bin/activate

# On Windows
venv\Scripts\activate

3. Install Dependencies

pip install -r requirements.txt

4. Generate Encryption Key (Optional) - This is done automatically

python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())" > confidential.key

5. Run Database Migrations

python manage.py migrate

6. Create Superuser

python manage.py createsuperuser

7. Use my initial admin script

Run python manage.py initial_admin_setup <yoursuperusername> You can skip making a super user and this script will trigger superuser creation. Link up your authenticator app using the generated key. Now you can login as a admin in terms of roles and are also a superuser that can access the /admin panel.

8. Start Development Server

python manage.py runserver

Testing & Development

# Simulate anomalies for testing (spam failed logins, multiple IPs/users)
python generate_anomalies.py

# Encrypt existing MFA secrets (automatically handled)
python manage.py encrypt_mfa_secrets

# Populate user fields with mock/filler data
python manage.py populate_user_fields