Orange County Lettings - Getting Started¶
This page explains how to set up the project locally: cloning, virtual environment, installation and dependencies.
Prerequisites¶
Git CLI
Python 3.13 (recommended)
SQLite3 CLI
Access to this repository
Clone the repository¶
git clone <your-fork-or-repo-url>
cd oc_lettings
Create and activate a virtual environment¶
python3 -m venv venv
source venv/bin/activate # macOS/Linux
# On Windows PowerShell
# .\\venv\\Scripts\\Activate.ps1
Note
Always ensure the virtual environment is active before running commands.
Confirm environment is active¶
which python
python --version
which pip
Install dependencies¶
The project uses a lockfile. Prefer installing from uv.lock when using uv; otherwise use requirements.txt.
Using uv (recommended):
pip install uv uv sync
Using pip:
pip install --requirement requirements.txt
Environment configuration¶
Copy and adjust a .env file if needed (see variables used in oc_lettings_site/settings.py). A starter template is available as .env.example at the repo root.
ENV_MODE: dev or prodDJANGO_SECRET_KEY: secret key for productionSENTRY_DSN: optional Sentry DSN
Generate strong secrets with Clinkey (optional)¶
Web UI: see Orange County Lettings - Clinkey
CLI example to export a strong Django secret key:
pip install clinkey-cli DJANGO_SECRET_KEY=$(clinkey -t super_strong -l 64 -s - --lower)
Run database migrations¶
python manage.py migrate
Run the development server¶
python manage.py runserver
Open http://localhost:8000 in your browser.
Static files¶
Static assets are served from static/ in development. In production, files are collected to staticfiles/ and served by WhiteNoise.
Common issues¶
If the
venvmodule is missing on Linux:sudo apt-get install python3-venvEnsure the virtual environment is activated before running commands.
Orange County Lettings