mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 22:31:13 -05:00
Add email templates for user notifications and account management
- Created a base email template (base.html) for consistent styling across all emails. - Added moderation approval email template (moderation_approved.html) to notify users of approved submissions. - Added moderation rejection email template (moderation_rejected.html) to inform users of required changes for their submissions. - Created password reset email template (password_reset.html) for users requesting to reset their passwords. - Developed a welcome email template (welcome.html) to greet new users and provide account details and tips for using ThrillWiki.
This commit is contained in:
@@ -35,12 +35,25 @@ EMAIL_HOST_USER = env('EMAIL_HOST_USER', default='')
|
||||
EMAIL_HOST_PASSWORD = env('EMAIL_HOST_PASSWORD', default='')
|
||||
DEFAULT_FROM_EMAIL = env('DEFAULT_FROM_EMAIL', default='noreply@thrillwiki.com')
|
||||
|
||||
# Database - Require DATABASE_URL in production
|
||||
if not env('DATABASE_URL', default=None):
|
||||
raise ImproperlyConfigured('DATABASE_URL environment variable is required in production')
|
||||
# Database - Use PostGIS backend for production
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
||||
'NAME': env('DB_NAME'),
|
||||
'USER': env('DB_USER'),
|
||||
'PASSWORD': env('DB_PASSWORD'),
|
||||
'HOST': env('DB_HOST'),
|
||||
'PORT': env('DB_PORT', default='5432'),
|
||||
'CONN_MAX_AGE': env.int('CONN_MAX_AGE', default=600),
|
||||
'OPTIONS': {
|
||||
'sslmode': env('DB_SSLMODE', default='require'),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
# Connection pooling
|
||||
DATABASES['default']['CONN_MAX_AGE'] = env.int('CONN_MAX_AGE', default=600)
|
||||
# Verify required database credentials
|
||||
if not all([env('DB_NAME', default=None), env('DB_USER', default=None), env('DB_PASSWORD', default=None)]):
|
||||
raise ImproperlyConfigured('DB_NAME, DB_USER, and DB_PASSWORD environment variables are required in production')
|
||||
|
||||
# Redis - Require REDIS_URL in production
|
||||
if not env('REDIS_URL', default=None):
|
||||
|
||||
Reference in New Issue
Block a user