Skip to content

Commit b82c0b4

Browse files
committed
Add configuration for django-recaptcha
Signed-off-by: Keshav Priyadarshi <git@keshav.space>
1 parent 6654153 commit b82c0b4

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

federatedcode/settings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
FEDERATEDCODE_CLIENT_ID = env.str("FEDERATEDCODE_CLIENT_ID")
6262
FEDERATEDCODE_CLIENT_SECRET = env.str("FEDERATEDCODE_CLIENT_SECRET")
6363

64+
RECAPTCHA_PUBLIC_KEY = env.str("RECAPTCHA_PUBLIC_KEY")
65+
RECAPTCHA_PRIVATE_KEY = env.str("RECAPTCHA_PRIVATE_KEY")
66+
SILENCED_SYSTEM_CHECKS = ["captcha.recaptcha_test_key_error"]
67+
RECAPTCHA_DOMAIN = env.str("RECAPTCHA_DOMAIN", "www.recaptcha.net")
6468

6569
# Application definition
6670

@@ -78,6 +82,7 @@
7882
"django.contrib.humanize",
7983
# Third-party apps
8084
"oauth2_provider",
85+
"django_recaptcha",
8186
]
8287

8388
MIDDLEWARE = [

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Django==5.1.2
1616
django-environ==0.11.2
1717
django-ninja==1.3.0
1818
django-oauth-toolkit==3.0.1
19+
django-recaptcha==4.0.0
1920
djangorestframework==3.15.2
2021
doc8==1.1.2
2122
docutils==0.21.2

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ install_requires =
7676
python-dotenv==1.0.1
7777
click==8.1.7
7878

79+
# Captcha
80+
django-recaptcha==4.0.0
81+
7982
[options.extras_require]
8083
dev =
8184
# Validation

0 commit comments

Comments
 (0)