6 Commits

Author SHA1 Message Date
2dd84d27f0 add recaptcha plugin 2020-09-07 15:53:28 +02:00
8eeb5f5947 fix 2020-05-03 13:31:32 +02:00
0dfeb359ac fix 2020-05-03 13:18:45 +02:00
ee63555dd8 sentry integration 2020-04-29 12:20:22 +02:00
17b492c0e1 fix page item 2020-04-27 12:32:21 +02:00
00f5259f13 DATA_UPLOAD_MAX_MEMORY_SIZE 2020-04-20 10:25:03 +02:00
4 changed files with 34 additions and 8 deletions

View File

@@ -20,4 +20,15 @@ mailchimp3==2.1.0
django-image-cropping==1.2.0
django-anymail[mailgun]==1.4
django-admin-view-permission==1.9
gunicorn==19.9.0
gunicorn==19.9.0
sentry-sdk==0.14.3
aldryn-forms-recaptcha-plugin==1.0.0.2
django-recaptcha2==1.4.1
# compat versions
django-storages<1.9
psycopg2<2.8
django-parler<=2.1
django-select2<=6.3.1
django-sekizai<=1.1.0
django-classy-tags<=1.0.0
djangocms-attributes-field<=1.2.0

View File

@@ -1,6 +1,17 @@
# -*- coding: utf-8 -*-
import copy
import os
import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
sentry_sdk.init(
dsn="https://460e310d034c49a794941e087c4fcc6e@o74423.ingest.sentry.io/1196285",
integrations=[DjangoIntegration()],
# If you wish to associate users to errors (assuming you are using
# django.contrib.auth) you may enable sending PII data.
send_default_pii=True
)
INSTALLED_ADDONS = [
# <INSTALLED_ADDONS> # Warning: text inside the INSTALLED_ADDONS tags is auto-generated. Manual changes will be overwritten.
@@ -27,6 +38,8 @@ aldryn_addons.settings.load(locals())
INSTALLED_APPS.insert(0, 'admin_view_permission')
INSTALLED_APPS.extend([
'aldryn_forms_recaptcha_plugin',
'snowpenguin.django.recaptcha3',
'portal',
'project',
'fontawesome',
@@ -243,3 +256,10 @@ if not DEBUG:
'www.tagesschule-elementa.ch',
'tagesschule.mprofiag.ch',
]
DATA_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 * 1024
RECAPTCHA_PUBLIC_KEY = '6Lec78gZAAAAANc-oxXJPMi7BXmINlP-QkcS937g'
RECAPTCHA_PRIVATE_KEY = '6Lec78gZAAAAADuIppqW7cSh6iPw3TZQ9r-ogHtz'
RECAPTCHA_SCORE_THRESHOLD = 0.5

View File

@@ -203,12 +203,7 @@ class FormPlugin(_FormPlugin):
module = 'Content'
name = 'Form'
child_classes = ['TextField', 'TextAreaField', 'EmailField', 'RadioSelectField', 'MultipleSelectField',
'SubmitButton']
def send_notifications(self, instance, form):
if dict(form.get_serialized_field_choices()).get('honeypot', ''):
return []
return super(FormPlugin, self).send_notifications(instance, form)
'SubmitButton', 'ReCaptchaFieldPlugin']
class SocialMediaListItemInlineAdmin(admin.TabularInline):

View File

@@ -25,7 +25,7 @@
{% if search %}
<p>{% highlight page.text with request.GET.q %}</p>
{% else %}
{% elif text and text != 'None' %}
<p>{{ text }}</p>
{% endif %}