更新了settings.py的内容,在开发环境和生产环境统一

This commit is contained in:
2025-12-10 17:11:43 +08:00
parent 82c17639d7
commit d4bcf322d7
3 changed files with 35 additions and 7 deletions

13
.env.example Normal file
View File

@@ -0,0 +1,13 @@
# Django settings
SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=127.0.0.1,localhost
# Database settings
# DATABASE_URL=sqlite:///db.sqlite3
# For PostgreSQL: DATABASE_URL=postgres://user:password@localhost:5432/dbname
# For MySQL: DATABASE_URL=mysql://user:password@localhost:3306/dbname
# Static and media files
STATIC_ROOT=static
MEDIA_ROOT=media