mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 09:11:08 -05:00
good stuff
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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'
|
||||
|
||||
@@ -35,6 +35,9 @@ urlpatterns = [
|
||||
|
||||
# Redirect /user/ to the user's profile if logged in
|
||||
path('user/', accounts_views.user_redirect_view, name='user_redirect'),
|
||||
|
||||
# Moderation URLs - placed after other URLs but before static/media serving
|
||||
path('moderation/', include('moderation.urls', namespace='moderation')),
|
||||
]
|
||||
|
||||
# Serve static files in development
|
||||
|
||||
Reference in New Issue
Block a user