mirror of
https://github.com/lemeow125/StudE-Backend.git
synced 2024-11-17 06:19:24 +08:00
Added debug mode for frontend to handle email activation link changes
This commit is contained in:
parent
a2d1fb8081
commit
f550134998
2 changed files with 9 additions and 20 deletions
|
@ -29,6 +29,7 @@ SECRET_KEY = str(os.getenv('SECRET_KEY'))
|
|||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
FRONTEND_DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = ['*', '127.0.0.1', 'localhost', '10.0.10.32', '10.0.10.8']
|
||||
|
||||
|
@ -216,7 +217,7 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
|||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
DOMAIN = ''
|
||||
if (DEBUG):
|
||||
if (FRONTEND_DEBUG):
|
||||
DOMAIN = 'exp'
|
||||
else:
|
||||
DOMAIN = 'stude'
|
||||
|
|
|
@ -1,25 +1,13 @@
|
|||
{% load i18n %}
|
||||
|
||||
{% block subject %}
|
||||
{% blocktrans %}Account activation on {{ site_name }}{% endblocktrans %}
|
||||
{% endblock subject %}
|
||||
|
||||
{% block text_body %}
|
||||
{% blocktrans %}You're receiving this email because you need to finish activation process on {{ site_name }}.{% endblocktrans %}
|
||||
|
||||
{% trans "Please open the following link to activate your account in-app:" %}
|
||||
{{ domain }}://{{ url|safe }}
|
||||
|
||||
{% trans "Thanks you for using StudE!" %}
|
||||
|
||||
{% blocktrans %}The {{ site_name }} team{% endblocktrans %}
|
||||
{% endblock text_body %}
|
||||
|
||||
{% block html_body %}
|
||||
<p>{% blocktrans %}You're receiving this email because you need to finish activation process on {{ site_name }}.{% endblocktrans %}</p>
|
||||
|
||||
<p>{% trans "Please go to the following page to activate your account in-app:" %}</p>
|
||||
<p><a href="{{domain}}://{{url}}">{{ domain }}://{{url}}</a></p>
|
||||
<p>{% trans "Please click on the button below to activate your account in-app:" %}</p>
|
||||
<p>
|
||||
<a href="https://lemeow125.github.io/simple-redirect/#/redirect/{{ domain }}/activation/{{uid}}/{{token}}" style="background-color: #007BFF; color: white; padding: 10px 20px; text-align: center; text-decoration: none; display: inline-block;">
|
||||
Activate Account
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p>{% blocktrans %}Many thanks from the {{ site_name }} team{% endblocktrans %}</p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue