Fakultas Ilmu Komputer UI

Commit b5779a16 authored by hashlash's avatar hashlash
Browse files

add custom activation and password reset email template

parent 5c32d312
Pipeline #60213 passed with stages
in 2 minutes and 29 seconds
......@@ -3,7 +3,7 @@ coverage==5.2.1
Django==3.0.7
django-cors-headers==3.4.0
django-filter==2.3.0
django-graphql-auth==0.3.11
django-graphql-auth==0.3.14
django-graphql-jwt==0.3.1
freezegun==1.0.0
graphene-django==2.10.1
......
......@@ -15,7 +15,6 @@ import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
......@@ -27,6 +26,8 @@ DEBUG = os.environ.get("DEBUG", False)
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS').split()
FRONTEND_BASE_URL = os.environ.get('FRONTEND_BASE_URL', 'http://localhost:3000')
# Application definition
......@@ -58,15 +59,14 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
CORS_ORIGIN_WHITELIST = os.environ.get(
'CORS_ORIGIN_WHITELIST', 'http://localhost:3000').split()
CORS_ORIGIN_WHITELIST = os.environ.get('CORS_ORIGIN_WHITELIST', FRONTEND_BASE_URL).split()
ROOT_URLCONF = 'sizakat.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "templates")],
'DIRS': [os.path.join(BASE_DIR, 'sizakat', 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
......@@ -202,3 +202,13 @@ GRAPHQL_JWT = {
'JWT_VERIFY_EXPIRATION': True,
'JWT_LONG_RUNNING_REFRESH_TOKEN': True,
}
# Django GraphQL Auth
# https://django-graphql-auth.readthedocs.io/en/latest/settings/
GRAPHQL_AUTH = {
'EMAIL_TEMPLATE_VARIABLES': {
'frontend_base_url': FRONTEND_BASE_URL,
}
}
<p>Assalamu'alaikum warrahmatullah wabarakatuh.</p>
<p>Bapak/Ibu dapat mengaktifkan akun {{ user.username }} di Aplikasi SIZAKAT dengan klik link berikut:</p>
<p>{{ frontend_base_url }}/{{ path }}/{{ token }}.</p>
<p>Jazaakumullahu Khoiron.</p>
<p>Assalamu'alaikum warrahmatullah wabarakatuh.</p>
<p>Bapak/Ibu dapat membuat ulang password untuk akun {{ user.username }} di Aplikasi SIZAKAT dengan klik link berikut:</p>
<p>{{ frontend_base_url }}/{{ path }}/{{ token }}</p>
<p>Jazaakumullahu Khoiron.</p>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment