Minimal Django project scaffold created by the assistant.
Quick start (PowerShell):
-
Create a virtual environment and activate it:
python -m venv venv .\venv\Scripts\Activate.ps1
-
Install dependencies:
pip install -r requirements.txt
-
Run migrations and start dev server:
python manage.py migrate python manage.py runserver
Notes:
- Update
SECRET_KEYinmysite/settings.pyfor production. - This scaffold uses SQLite by default.
Smoke-check (without installing):
-
Ensure these files exist:
manage.pymysite/__init__.py,mysite/settings.py,mysite/urls.py,mysite/wsgi.py,mysite/asgi.pyrequirements.txt,README.md,.gitignore
-
You can run
python manage.py --helpafter activating a virtualenv with Django installed to see available commands.
Optional helper:
- Run
.\run-dev.ps1to create a venv, install deps and start the dev server (PowerShell).
Environment & admin
-
A
.envfile is included with development defaults (SECRET_KEY,DEBUG,ALLOWED_HOSTS). -
To create a superuser non-interactively (script uses environment variables):
$env:DJANGO_SUPERUSER_USERNAME='admin'; $env:DJANGO_SUPERUSER_EMAIL='admin@example.com'; $env:DJANGO_SUPERUSER_PASSWORD='adminpass'; .\venv\Scripts\python.exe create_superuser.py
Run without Activate.ps1
If your PowerShell blocks scripts, you can run the venv python directly:
.\venv\Scripts\python.exe -m pip install -r requirements.txt
.\venv\Scripts\python.exe manage.py migrate
.\venv\Scripts\python.exe manage.py runserver