Add environment configuration and email settings
- Created a new .env.example file for environment variable configuration including Django settings, email configurations, and common SMTP provider examples. - Updated .vscode/settings.json to include additional words for spell checking. - Enhanced config/settings.py to load environment variables using python-dotenv, added data directory management, and configured email settings. - Updated config/urls.py to include debug toolbar URLs conditionally based on testing. - Added pytest configuration in conftest.py for Django testing. - Created core application with custom User model, admin registration, and migrations. - Implemented tests for User model and admin functionalities. - Updated pyproject.toml to include new dependencies for debugging and environment management. - Updated uv.lock to reflect new package versions and dependencies.
This commit is contained in:
parent
11c3db9817
commit
96a159f691
16 changed files with 697 additions and 57 deletions
68
.env.example
Normal file
68
.env.example
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# Django Configuration
|
||||
# Set to False in production
|
||||
DEBUG=True
|
||||
|
||||
# Django Secret Key
|
||||
# Generate a new secret key for production: python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())'
|
||||
DJANGO_SECRET_KEY=your-secret-key-here
|
||||
|
||||
# Email Configuration
|
||||
# SMTP Host (examples below)
|
||||
EMAIL_HOST=smtp.gmail.com
|
||||
|
||||
# SMTP Port (common ports: 587 for TLS, 465 for SSL, 25 for unencrypted)
|
||||
EMAIL_PORT=587
|
||||
|
||||
# Email credentials
|
||||
EMAIL_HOST_USER=your-email@gmail.com
|
||||
EMAIL_HOST_PASSWORD=your-app-password-here
|
||||
|
||||
# Connection security
|
||||
# Use TLS (True for most providers like Gmail, Outlook)
|
||||
EMAIL_USE_TLS=True
|
||||
# Use SSL (False for most providers, True for some like older configurations)
|
||||
EMAIL_USE_SSL=False
|
||||
|
||||
# Connection timeout in seconds
|
||||
EMAIL_TIMEOUT=10
|
||||
|
||||
# Common SMTP Provider Examples:
|
||||
#
|
||||
# Gmail:
|
||||
# EMAIL_HOST=smtp.gmail.com
|
||||
# EMAIL_PORT=587
|
||||
# EMAIL_USE_TLS=True
|
||||
# EMAIL_USE_SSL=False
|
||||
# Note: Requires App Password with 2FA enabled
|
||||
#
|
||||
# Outlook/Hotmail:
|
||||
# EMAIL_HOST=smtp-mail.outlook.com
|
||||
# EMAIL_PORT=587
|
||||
# EMAIL_USE_TLS=True
|
||||
# EMAIL_USE_SSL=False
|
||||
#
|
||||
# Yahoo:
|
||||
# EMAIL_HOST=smtp.mail.yahoo.com
|
||||
# EMAIL_PORT=587
|
||||
# EMAIL_USE_TLS=True
|
||||
# EMAIL_USE_SSL=False
|
||||
#
|
||||
# SendGrid:
|
||||
# EMAIL_HOST=smtp.sendgrid.net
|
||||
# EMAIL_PORT=587
|
||||
# EMAIL_USE_TLS=True
|
||||
# EMAIL_USE_SSL=False
|
||||
# EMAIL_HOST_USER=apikey
|
||||
# EMAIL_HOST_PASSWORD=your-sendgrid-api-key
|
||||
#
|
||||
# Mailgun:
|
||||
# EMAIL_HOST=smtp.mailgun.org
|
||||
# EMAIL_PORT=587
|
||||
# EMAIL_USE_TLS=True
|
||||
# EMAIL_USE_SSL=False
|
||||
#
|
||||
# Amazon SES:
|
||||
# EMAIL_HOST=email-smtp.us-east-1.amazonaws.com
|
||||
# EMAIL_PORT=587
|
||||
# EMAIL_USE_TLS=True
|
||||
# EMAIL_USE_SSL=False
|
||||
Loading…
Add table
Add a link
Reference in a new issue