good stuff

This commit is contained in:
pacnpal
2024-10-29 21:29:16 -04:00
parent 4e970400ef
commit 6880f36b99
42 changed files with 2835 additions and 262 deletions

View File

@@ -46,6 +46,7 @@ INSTALLED_APPS = [
'reviews',
'email_service',
'media',
'moderation',
]
MIDDLEWARE = [
@@ -61,7 +62,7 @@ MIDDLEWARE = [
'allauth.account.middleware.AccountMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware',
'simple_history.middleware.HistoryRequestMiddleware',
'django_htmx.middleware.HtmxMiddleware', # Added HTMX middleware
'django_htmx.middleware.HtmxMiddleware',
]
ROOT_URLCONF = 'thrillwiki.urls'
@@ -77,6 +78,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'moderation.context_processors.moderation_access', # Added moderation context processor
],
},
},
@@ -159,8 +161,8 @@ ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_USERNAME_REQUIRED = True
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_EMAIL_VERIFICATION = 'optional'
LOGIN_REDIRECT_URL = '/' # Updated to use Django template URL
ACCOUNT_LOGOUT_REDIRECT_URL = '/' # Updated to use Django template URL
LOGIN_REDIRECT_URL = '/'
ACCOUNT_LOGOUT_REDIRECT_URL = '/'
# Custom adapters
ACCOUNT_ADAPTER = 'accounts.adapters.CustomAccountAdapter'
@@ -193,8 +195,8 @@ SOCIALACCOUNT_PROVIDERS = {
# Additional social account settings
SOCIALACCOUNT_LOGIN_ON_GET = True
SOCIALACCOUNT_AUTO_SIGNUP = False # We want to handle the signup process
SOCIALACCOUNT_STORE_TOKENS = True # Store the OAuth tokens
SOCIALACCOUNT_AUTO_SIGNUP = False
SOCIALACCOUNT_STORE_TOKENS = True
# Email settings
EMAIL_BACKEND = 'email_service.backends.ForwardEmailBackend'