diff options
author | Matthew Lemon <y@yulqen.org> | 2024-12-09 17:16:41 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-12-09 17:16:41 +0000 |
commit | b481069d9444cc0756bd9f6780e7700dcf4903f5 (patch) | |
tree | 5cba9e3d501f79747c8af22bd1b0fd7d783e7ded /config | |
parent | d3dda8c0bd194c28cf11c189c150c00bdc3e8a83 (diff) |
wip: moving home page to home app and implementing reCAPTCHA
Diffstat (limited to 'config')
-rw-r--r-- | config/settings/base.py | 5 | ||||
-rw-r--r-- | config/settings/production.py | 1 | ||||
-rw-r--r-- | config/urls.py | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/config/settings/base.py b/config/settings/base.py index 157926b..991605c 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -77,6 +77,7 @@ THIRD_PARTY_APPS = [ "allauth.mfa", "allauth.socialaccount", "django_celery_beat", + "django_recaptcha", ] STRIPE_SECRET_KEY = env("STRIPE_SECRET_KEY") @@ -88,6 +89,7 @@ LOCAL_APPS = [ "alphabetlearning.users", "alphabetlearning.resources", "alphabetlearning.payments", + "alphabetlearning.pages", # Your stuff: custom apps go here ] # https://docs.djangoproject.com/en/dev/ref/settings/#installed-apps @@ -366,3 +368,6 @@ CACHES = { "LOCATION": "rate_limit_cache", }, } + +RECAPTCHA_PUBLIC_KEY = env("RECAPTCHA_PUBLIC_KEY") +RECAPTCHA_PRIVATE_KEY = env("RECAPTCHA_PRIVATE_KEY") diff --git a/config/settings/production.py b/config/settings/production.py index 374be33..ff9e475 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -233,3 +233,4 @@ MAILGUN_API_URL = env("MAILGUN_API_URL", default="https://api.eu.mailgun.net/v3" USE_X_FORWARDED_HOST = True SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https") +RECAPTCHA_USE_SSL = True # Use HTTPS for requests diff --git a/config/urls.py b/config/urls.py index e213522..554d227 100644 --- a/config/urls.py +++ b/config/urls.py @@ -12,10 +12,11 @@ from django.views.generic import TemplateView # import debug_toolbar -admin.site.site_header = "Blackbird Admin Panel" +admin.site.site_header = "Alphabet Learning Admin Panel" urlpatterns = [ - path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), + # path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), + path("", include("alphabetlearning.pages.urls", namespace="pages")), path( "about/", TemplateView.as_view(template_name="pages/about.html"), |