diff --git a/bartenders/forms.py b/bartenders/forms.py index 3923635..2938f52 100644 --- a/bartenders/forms.py +++ b/bartenders/forms.py @@ -24,6 +24,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self.fields["captcha"].help_text = "Hjemmesiden er sikret med reCAPTCHAv2" self.fields["tshirt_size"].widget.attrs.update({"class": "form-control"}) for name in self.fields: self.fields[name].required = name != "info" diff --git a/fredagscafeen/settings/base.py b/fredagscafeen/settings/base.py index 6cb462b..955ac69 100644 --- a/fredagscafeen/settings/base.py +++ b/fredagscafeen/settings/base.py @@ -296,9 +296,6 @@ LOGIN_URL = "/login/" -# Use the new NoCaptcha -NOCAPTCHA = True - # CORS Setup CORS_URLS_REGEX = r"^/api/.*$" # Only allow CORS requests in /api CORS_ORIGIN_ALLOW_ALL = True diff --git a/requirements.in b/requirements.in index f403965..80be9fe 100644 --- a/requirements.in +++ b/requirements.in @@ -1,9 +1,8 @@ -django==5.* +django==3.* python-dotenv djangorestframework dj-config-url -django-bootstrap-icons -django-bootstrap5 +django-bootstrap-v5 django-recaptcha gunicorn Pillow @@ -21,9 +20,6 @@ django-constance[database] iterfzf celery[redis] django-celery-beat -django-rosetta==0.10.1 +django-rosetta==0.9.9 lxml_html_clean -pydantic -importlib-metadata -cron-descriptor -typing-extensions +django_bootstrap_icons diff --git a/requirements.txt b/requirements.txt index a67e502..8e30c6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,10 +4,10 @@ # # pip-compile requirements.in # -annotated-types==0.7.0 - # via -r requirements.in amqp==5.2.0 # via kombu +annotated-types==0.7.0 + # via pydantic appdirs==1.4.4 # via pyppeteer appnope==0.1.4 @@ -16,19 +16,23 @@ asgiref==3.8.1 # via django backcall==0.2.0 # via ipython -beautifulsoup4==4.12.3 - # via bs4 -billiard==4.2.1 +beautifulsoup4==4.9.3 + # via + # bs4 + # django-bootstrap-v5 +billiard==4.2.0 # via celery -bs4==0.0.2 +bs4==0.0.1 # via requests-html celery[redis]==5.4.0 # via # -r requirements.in # django-celery-beat certifi==2024.8.30 - # via requests -charset-normalizer==3.4.0 + # via + # pyppeteer + # requests +charset-normalizer==3.3.2 # via requests click==8.1.7 # via @@ -40,23 +44,22 @@ click-didyoumean==0.3.1 # via celery click-plugins==1.1.1 # via celery -click-repl==0.3.0 +click-repl==0.2.0 # via celery -cron-descriptor - # via -r requirements.in -cssselect==1.2.0 +cssselect==1.1.0 # via pyquery -decorator==5.1.1 +decorator==5.0.9 # via ipython defusedxml==0.7.1 - # via -r requirements.in + # via django-bootstrap-icons dj-config-url==0.1.1 # via -r requirements.in -django==4.2 +django==3.2.4 # via # -r requirements.in # django-bootstrap-datepicker-plus - # django-bootstrap5 + # django-bootstrap-icons + # django-bootstrap-v5 # django-celery-beat # django-cors-headers # django-extensions @@ -70,97 +73,97 @@ django==4.2 # djangorestframework django-bootstrap-datepicker-plus==5.0.5 # via -r requirements.in -django-bootstrap-icons==0.8.7 +django-bootstrap-icons==0.9.0 # via -r requirements.in django-bootstrap-v5==1.0.11 # via -r requirements.in -django-celery-beat==2.7.0 +django-celery-beat==2.2.0 # via -r requirements.in -django-constance[database]==4.1.2 +django-constance[database]==2.8.0 # via -r requirements.in -django-cors-headers==4.4.0 +django-cors-headers==3.7.0 # via -r requirements.in -django-extensions==3.2.3 +django-extensions==3.1.3 # via -r requirements.in -django-ical==1.9.2 +django-ical==1.8.0 # via -r requirements.in django-logentry-admin==1.1.0 # via -r requirements.in -django-object-actions==4.3.0 +django-object-actions==3.0.2 # via -r requirements.in -django-picklefield==3.2 +django-picklefield==3.0.1 # via django-constance -django-recaptcha==3.0.0 +django-recaptcha==2.0.6 # via -r requirements.in -django-recurrence==1.11.1 +django-recurrence==1.10.3 # via django-ical -django-rosetta==0.10.1 +django-rosetta==0.9.9 # via -r requirements.in -django-timezone-field==7.0 +django-timezone-field==4.1.2 # via django-celery-beat -djangorestframework==3.15.2 +djangorestframework==3.12.4 # via -r requirements.in -fake-useragent==1.5.1 +fake-useragent==0.1.11 # via requests-html -gunicorn==23.0.0 +gunicorn==20.1.0 # via -r requirements.in -icalendar==6.0.1 +icalendar==4.0.7 # via django-ical -idna==3.10 +idna==2.10 # via requests importlib-metadata==8.5.0 - # via -r requirements.in + # via pyppeteer ipython==7.24.1 # via -r requirements.in ipython-genutils==0.2.0 # via traitlets -iterfzf==1.4.0.54.3 +iterfzf==0.5.0.20.0 # via -r requirements.in jedi==0.18.0 # via ipython -kombu==5.4.2 +kombu==5.3.7 # via celery -lxml==5.3.0 +lxml==5.2.1 # via # lxml-html-clean # pyquery -lxml-html-clean==0.3.1 +lxml-html-clean==0.1.1 # via -r requirements.in -matplotlib-inline==0.1.7 +matplotlib-inline==0.1.2 # via ipython -parse==1.20.2 +parse==1.19.0 # via requests-html -parso==0.8.4 +parso==0.8.2 # via jedi -pexpect==4.9.0 +pexpect==4.8.0 # via ipython pickleshare==0.7.5 # via ipython -pillow==10.4.0 +pillow==8.2.0 # via -r requirements.in polib==1.2.0 # via django-rosetta -prompt-toolkit==3.0.48 +prompt-toolkit==3.0.18 # via # click-repl # ipython -psycopg2==2.9.10 +psycopg2==2.9.9 # via -r requirements.in ptyprocess==0.7.0 # via pexpect pydantic==2.9.2 - # via -r requirements.in + # via django-bootstrap-datepicker-plus pydantic-core==2.23.4 # via pydantic pyee==11.1.1 # via pyppeteer -pygments==2.18.0 +pygments==2.9.0 # via ipython pyppeteer==2.0.0 # via requests-html -pyquery==2.0.1 +pyquery==1.4.3 # via requests-html -python-crontab==3.2.0 +python-crontab==2.5.1 # via django-celery-beat python-dateutil==2.9.0.post0 # via @@ -168,7 +171,7 @@ python-dateutil==2.9.0.post0 # django-recurrence # icalendar # python-crontab -python-dotenv==1.0.1 +python-dotenv==0.17.1 # via -r requirements.in pytz==2021.1 # via @@ -176,10 +179,11 @@ pytz==2021.1 # django-recurrence # django-timezone-field # icalendar -redis==5.1.1 +redis==5.0.7 # via celery requests==2.32.3 # via + # django-bootstrap-icons # django-rosetta # requests-html requests-html==0.10.0 @@ -189,21 +193,25 @@ six==1.16.0 # click-repl # python-dateutil # w3lib -soupsieve==2.6 +soupsieve==2.2.1 # via beautifulsoup4 -sqlparse==0.5.1 +sqlparse==0.4.1 # via django -tqdm==4.66.5 +tqdm==4.61.1 # via pyppeteer -traitlets==5.14.3 +traitlets==5.0.5 # via # ipython # matplotlib-inline typing-extensions==4.12.2 - # via -r requirements.in -tzdata==2024.2 + # via + # django-bootstrap-datepicker-plus + # pydantic + # pydantic-core + # pyee +tzdata==2024.1 # via celery -urllib3==1.26.20 +urllib3==1.26.5 # via # pyppeteer # requests @@ -212,14 +220,16 @@ vine==5.1.0 # amqp # celery # kombu -w3lib==2.2.1 +w3lib==1.22.0 # via requests-html -wcwidth==0.2.13 +wcwidth==0.2.5 # via prompt-toolkit websockets==10.4 # via pyppeteer -whitenoise==6.7.0 +whitenoise==5.2.0 # via -r requirements.in +zipp==3.20.2 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/udlejning/forms.py b/udlejning/forms.py index 4340963..9441779 100644 --- a/udlejning/forms.py +++ b/udlejning/forms.py @@ -27,6 +27,7 @@ class Meta: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + self.fields["captcha"].help_text = "Hjemmesiden er sikret med reCAPTCHAv2" self.fields["paymentType"].widget.attrs.update({"class": "form-control"}) for name in self.fields: self.fields[name].required = name not in ["EANnumber", "comments"] diff --git a/web/forms.py b/web/forms.py index 1e9aa4f..f0a3426 100644 --- a/web/forms.py +++ b/web/forms.py @@ -17,6 +17,7 @@ class LoginForm(forms.Form): email = forms.EmailField() captcha = ReCaptchaField(widget=ReCaptchaV2Invisible) + captcha.help_text = "Hjemmesiden er sikret med reCAPTCHAv2" def clean_email(self): email = self.cleaned_data["email"] diff --git a/web/templates/secrets_admin.html b/web/templates/secrets_admin.html index a292040..182e268 100644 --- a/web/templates/secrets_admin.html +++ b/web/templates/secrets_admin.html @@ -26,7 +26,7 @@ {% if value != None %} {{ value }} {% else %} {% translate "Missing from environment" %} diff --git a/web/urls.py b/web/urls.py index 6f67f6a..efe6c11 100644 --- a/web/urls.py +++ b/web/urls.py @@ -38,7 +38,7 @@ path("prices/", Items.as_view()), path("scanner/", Scanner.as_view()), path("board/", Board.as_view()), - path("", Index.as_view()), + path("", Index.as_view(), name="index"), path("profile/", BartenderInfo.as_view(), name="profile"), path("vote/", Ballots.as_view(), name="ballots"), path("vote/update/", BallotsUpdate.as_view(), name="ballots_update"),