diff --git a/auth.py b/auth.py index 0d1081b..9f71aa2 100644 --- a/auth.py +++ b/auth.py @@ -1,7 +1,6 @@ from datetime import datetime import functools import logging -from django import db from flask import ( Blueprint, flash, g, redirect, render_template, request, session, url_for @@ -31,7 +30,8 @@ def register(): error = 'Password is required.' elif not email: error = 'Email is required.' - # TODO: check passwrd complexity + elif password.lower()== password or password.upper()==password or password.isdigit() or len(password)<=8: #check passwrd complexity + error = 'Bedingungen für passwort nicht erfüllt.' if error is None: try: @@ -48,7 +48,7 @@ def register(): confirm_url = url_for('auth.confirm_email', token=token, _external=True) logging.info("Generated confirmation url: %s", confirm_url) content = render_template('auth/confirm_mail.html', confirm_url=confirm_url, username=username, email=email) - subject = "Registrierung für Planner von %s" % email + subject = "Registrierung für ProPedal - Planner von %s" % email calendar_interface.send_mail("struebin.patrick@gmail.com", subject, content) flash("Registrierung erfolgreich.") @@ -156,4 +156,4 @@ def confirm_email(token): db.commit() outcome= "User wurde erfolgreich freigeschaltet." - return render_template('auth/confirmation_successful.html', email=email, outcome=outcome) \ No newline at end of file + return render_template('auth/confirmation.html', email=email, outcome=outcome) \ No newline at end of file diff --git a/templates/auth/confirmation.html b/templates/auth/confirmation.html index 023f530..195fcda 100644 --- a/templates/auth/confirmation.html +++ b/templates/auth/confirmation.html @@ -2,6 +2,6 @@ {% block content %}

{% block title %}Benutzer mit email: {{email}}.{% endblock %}

-

{% block title %}{{outcome}}.{% endblock %}

+

{{outcome}}

{% endblock %} \ No newline at end of file diff --git a/templates/auth/register.html b/templates/auth/register.html index 817dc3d..5ccd709 100644 --- a/templates/auth/register.html +++ b/templates/auth/register.html @@ -5,13 +5,18 @@ {% endblock %} {% block content %} -
- - - - - - - -
+ +
+ + + + + + +
+ +
+ +
+
{% endblock %} \ No newline at end of file