AI-powered Content Management System
This project now uses PostgreSQL instead of SQLite to avoid "database is locked" errors that can occur with SQLite when multiple processes (like Django Q workers) try to access the database simultaneously.
- Docker and Docker Compose installed on your system
- Python 3.13 or higher
-
Start the PostgreSQL database:
docker compose up -d
This will start a PostgreSQL database in a Docker container.
-
Install dependencies:
uv sync
This will install all required dependencies, including the newly added
psycopg2-binaryfor PostgreSQL support. -
Run migrations:
python manage.py migrate
This will create all necessary database tables in PostgreSQL.
-
Create a superuser:
python manage.py createsuperuser
-
Run the development server:
python manage.py runserver
The project now uses environment variables for configuration. These are stored in a .env file in the project root. The following variables are available:
DEBUG: Set toTruefor development,Falsefor productionSECRET_KEY: Django secret keyDATABASE_URL: PostgreSQL connection URLAI_BASE_URL: URL for the AI APIAI_API_KEY: API key for the AI serviceAI_API_MODEL: Model name for the AI service
-
If you encounter connection issues, make sure the PostgreSQL container is running:
docker compose ps
-
To view PostgreSQL logs:
docker compose logs postgres
-
To reset the database:
docker compose down -v docker compose up -d python manage.py migrate