diff --git a/core/settings.py b/core/settings.py index 03ed141..3eac23e 100644 --- a/core/settings.py +++ b/core/settings.py @@ -176,15 +176,16 @@ AUTH_PROFILE_MODULE = 'account_manager.UserProfile' ######################################################################################################################## # EMAIL Config # ######################################################################################################################## -EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend' -EMAIL_FILE_PATH = os.path.join(BASE_DIR, "sent_emails") -# EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' +# EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend' +# EMAIL_FILE_PATH = os.path.join(BASE_DIR, "sent_emails") +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_TIMEOUT = 15 EMAIL_HOST = 'smtp.uni-bamberg.de' EMAIL_PORT = 587 EMAIL_USE_TLS = False EMAIL_USE_SSL = False -EMAIL_HOST_USER = 'vergesslich@uni-bamberg.de' +DEFAULT_FROM_EMAIL = 'vergesslich@uni-bamberg.de' +SERVER_EMAIL = 'fachschaft-wiai.stuve@uni-bamberg.de' ######################################################################################################################## # Logging Config # diff --git a/core/urls.py b/core/urls.py index a41c54d..4291e9f 100644 --- a/core/urls.py +++ b/core/urls.py @@ -24,5 +24,8 @@ urlpatterns = [ path('', include('account_manager.urls')), path('admin/', admin.site.urls), path('accounts/login/', auth_views.LoginView.as_view(redirect_authenticated_user=True), name='login'), + path('accounts/password_reset/', + auth_views.PasswordResetView.as_view(html_email_template_name='registration/password_reset_email.html'), + name='password_reset'), path('accounts/', include('django.contrib.auth.urls')), ] diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html index 04e1810..12f71a9 100644 --- a/templates/registration/password_reset_email.html +++ b/templates/registration/password_reset_email.html @@ -1,6 +1,5 @@
Es wurde Passwort zurücksetzen für den Account mit der E-Mail {{ email }} angefordert
Wenn Sie keine Mail angefordert haben, ignorieren Sie diese.
-Der Link ist nur {{ expiration_days }} Tage gültig!
Bitte klicke auf den folgenden Link um Ihr Password zurückzusetzen
{{ protocol }}://{{ domain }}{{ url('ldap_password_reset_confirm', kwargs={'uidb64':uid, 'token':token}) }}