Merge branch 'develop' into feature/licensing

# Conflicts:
#	server/core/settings.py
#	server/core/urls.py
#	server/core/views.py
This commit is contained in:
Christian Cueni 2020-04-30 09:49:22 +02:00
commit 1bc2436a8b
5 changed files with 37 additions and 10 deletions

View File

@ -362,10 +362,13 @@ WAGTAIL_SITE_NAME = 'skillbox'
GRAPHQL_QUERIES_DIR = os.path.join(BASE_DIR, '..', 'client', 'src', 'graphql', 'gql') GRAPHQL_QUERIES_DIR = os.path.join(BASE_DIR, '..', 'client', 'src', 'graphql', 'gql')
GRAPHQL_MUTATIONS_DIR = os.path.join(GRAPHQL_QUERIES_DIR, 'mutations') GRAPHQL_MUTATIONS_DIR = os.path.join(GRAPHQL_QUERIES_DIR, 'mutations')
EMAIL_BACKEND = 'sendgrid_backend.SendgridBackend' # Sendgrid Config
# EMAIL_BACKEND = 'sendgrid_backend.SendgridBackend'
#
# SENDGRID_API_KEY = os.environ.get("SENDGRID_API_KEY")
# SENDGRID_SANDBOX_MODE_IN_DEBUG = False
SENDGRID_API_KEY = os.environ.get("SENDGRID_API_KEY")
SENDGRID_SANDBOX_MODE_IN_DEBUG = False
DEFAULT_FROM_EMAIL = 'myskillbox <noreply@myskillbox.ch>' DEFAULT_FROM_EMAIL = 'myskillbox <noreply@myskillbox.ch>'
# Taskbase # Taskbase
@ -375,6 +378,15 @@ TASKBASE_SUPERUSER = os.environ.get("TASKBASE_SUPERUSER")
TASKBASE_SUPERPASSWORD = os.environ.get("TASKBASE_SUPERPASSWORD") TASKBASE_SUPERPASSWORD = os.environ.get("TASKBASE_SUPERPASSWORD")
TASKBASE_BASEURL = os.environ.get("TASKBASE_BASEURL") TASKBASE_BASEURL = os.environ.get("TASKBASE_BASEURL")
# Metanet Config
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = os.environ.get("EMAIL_HOST")
EMAIL_PORT = os.environ.get("EMAIL_PORT")
EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD")
EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER")
EMAIL_USE_TLS = True
EMAIL_USE_SSL = False
ALLOW_BETA_LOGIN = True ALLOW_BETA_LOGIN = True

View File

@ -1,15 +1,21 @@
{% load i18n %} {% load i18n %}
{% load core_tags %} {% load core_tags %}
{% autoescape off %} {% autoescape off %}
<p>
{% blocktrans %}Sie erhalten diese E-Mail, weil Ihr Passwort auf {{ site_name }} zurückgesetzt wurde.{% endblocktrans %}
</p>
{% blocktrans %}Du erhältst dieses E-Mail, weil dein Passwort auf {{ site_name }} zurückgesetzt wurde.{% endblocktrans %} <p>
{% trans "Bitte öffnen Sie folgende Seite, um Ihr neues Passwort einzugeben:" %} {% trans "Bitte öffnen Sie folgende Seite, um Ihr neues Passwort einzugeben:" %}
</p>
{% block reset_link %} {% block reset_link %}
<p>
<a href="{% reset_link 'password_reset_confirm' protocol domain token uid %}">{% reset_link 'password_reset_confirm' protocol domain token uid %}</a> <a href="{% reset_link 'password_reset_confirm' protocol domain token uid %}">{% reset_link 'password_reset_confirm' protocol domain token uid %}</a>
</p>
{% endblock %} {% endblock %}
<p>
{% trans "Ihr Benutzername lautet:" %} {{ user.get_username }} {% trans "Ihr Benutzername lautet:" %} {{ user.get_username }}
</p>
{% trans "Ihr Skillbox Team" %} {% trans "Ihr Skillbox Team" %}
{% endautoescape %} {% endautoescape %}

View File

@ -1,15 +1,26 @@
{% load i18n %} {% load i18n %}
{% load core_tags %} {% load core_tags %}
{% autoescape off %} {% autoescape off %}
<p>
{% blocktrans %}Sie erhalten diese E-Mail, um Ihr Passwort auf mySkillbox initial zu setzen.{% endblocktrans %} {% blocktrans %}Sie erhalten diese E-Mail, um Ihr Passwort auf mySkillbox initial zu setzen.{% endblocktrans %}
</p>
<p>
{% trans "Bitte öffnen Sie folgende Seite, um Ihr neues Passwort einzugeben:" %} {% trans "Bitte öffnen Sie folgende Seite, um Ihr neues Passwort einzugeben:" %}
</p>
<p>
{% block reset_link %} {% block reset_link %}
<a href="{% reset_link 'set_password_confirm' protocol domain token uid %}">{% reset_link 'set_password_confirm' protocol domain token uid %}</a> <a href="{% reset_link 'set_password_confirm' protocol domain token uid %}">{% reset_link 'set_password_confirm' protocol domain token uid %}</a>
</p>
{% endblock %} {% endblock %}
{% trans "Ihr Benutzername lautet:" %} {{ user.get_username }}
<p>
{% trans "Ihr Benutzername lautet:" %} {{ user.get_username }}
</p>
<p>
{% trans "Ihr mySkillbox Team" %} {% trans "Ihr mySkillbox Team" %}
</p>
{% endautoescape %} {% endautoescape %}

View File

@ -13,7 +13,6 @@ from core import views
urlpatterns = [ urlpatterns = [
# django admin # django admin
url(r'^guru/', admin.site.urls), url(r'^guru/', admin.site.urls),
url(r'^accounts/', include('django.contrib.auth.urls')),
url(r'^statistics/', include('statistics.urls', namespace='statistics')), url(r'^statistics/', include('statistics.urls', namespace='statistics')),
# wagtail # wagtail

View File

@ -31,7 +31,6 @@ def home(request):
class ConfirmationKeyDisplayView(TemplateView): class ConfirmationKeyDisplayView(TemplateView):
template_name = 'confirmation_key.html' template_name = 'confirmation_key.html'
def get_context_data(self, *args, **kwargs): def get_context_data(self, *args, **kwargs):