diff --git a/appointment/__init__.py b/appointment/__init__.py index 7c25e4e..eeeb2cd 100644 --- a/appointment/__init__.py +++ b/appointment/__init__.py @@ -5,5 +5,5 @@ __package_name__ = "django-appointment" __url__ = "https://github.com/adamspd/django-appointment" __package_website__ = "https://django-appt.adamspierredavid.com/" -__version__ = "3.1.2" +__version__ = "3.1.3" __test_version__ = False diff --git a/appointment/templates/error_pages/304_already_submitted.html b/appointment/templates/error_pages/304_already_submitted.html index 7b47fdb..3cde2a1 100644 --- a/appointment/templates/error_pages/304_already_submitted.html +++ b/appointment/templates/error_pages/304_already_submitted.html @@ -1,4 +1,4 @@ - + {% extends BASE_TEMPLATE %} {% load i18n %} {% load static %} @@ -9,10 +9,10 @@ {% endblock %} {% block title %} - {{ page_title }} + {% trans "Not authorized!" %} {% endblock %} {% block description %} - {{ page_description }} + {% trans "Form resubmission not allowed." %} {% endblock %} {% block body %} @@ -22,10 +22,10 @@
304

Sorry, re-submission is not allowed.

-

But don't worry, you can create a new appointment.

+ >{% trans 'Sorry, re-submission is not allowed' %}.

+

{% translate "But don't worry, you can create a new appointment" %}.

- +
Artboard 1 copy diff --git a/appointments/settings.py b/appointments/settings.py index fc9b41f..44c63a6 100644 --- a/appointments/settings.py +++ b/appointments/settings.py @@ -14,6 +14,9 @@ from django.conf import locale from django.utils.translation import gettext_lazy as _ +from dotenv import load_dotenv + +load_dotenv() # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -137,8 +140,8 @@ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 -EMAIL_HOST_USER = "awesome.email@django-appointment.com" -EMAIL_HOST_PASSWORD = "very-insecure-password" +EMAIL_HOST_USER = os.getenv('EMAIL_HOST_USER', default="") +EMAIL_HOST_PASSWORD = os.getenv('EMAIL_HOST_PASSWORD', default="") EMAIL_USE_TLS = True EMAIL_SUBJECT_PREFIX = "" EMAIL_USE_LOCALTIME = True diff --git a/requirements.txt b/requirements.txt index ef89e1c..cecd2e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,5 @@ babel==2.14.0 setuptools==69.1.0 pytz~=2024.1 requests~=2.31.0 -django-q2==1.6.1 \ No newline at end of file +django-q2==1.6.1 +python-dotenv==1.0.1 \ No newline at end of file