diff --git a/app/__init__.py b/app/__init__.py index aef0c2b6..cf5442ec 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -10,7 +10,7 @@ import logging db = SQLAlchemy() logger = logging.getLogger(__name__) login_manager = LoginManager() -login_manager.login_view = 'auth.login' +login_manager.login_view = 'main.index' mail = Mail() socketio = SocketIO() diff --git a/app/auth/forms.py b/app/auth/forms.py index b366c05e..7f8d1141 100644 --- a/app/auth/forms.py +++ b/app/auth/forms.py @@ -35,10 +35,8 @@ class RegistrationForm(FlaskForm): email = StringField('Email', validators=[DataRequired(), Email()]) username = StringField( 'Username', - validators=[DataRequired(), - Length(1, 64), - Regexp('^[A-Za-z][A-Za-z0-9_.]*$', - 0, + validators=[DataRequired(), Length(1, 64), + Regexp('^[A-Za-z][A-Za-z0-9_.]*$', 0, 'Usernames must have only letters, numbers, dots ' 'or underscores')] ) diff --git a/app/auth/views.py b/app/auth/views.py index 37f054e7..5ed21377 100644 --- a/app/auth/views.py +++ b/app/auth/views.py @@ -22,15 +22,14 @@ def logout(): def register(): if not current_user.is_anonymous: return redirect(url_for('main.dashboard')) - registration_form = RegistrationForm() + registration_form = RegistrationForm(prefix='registration-form') if registration_form.validate_on_submit(): user = User(email=registration_form.email.data.lower(), password=registration_form.password.data, username=registration_form.username.data) db.session.add(user) db.session.commit() - dir = os.path.join(current_app.config['NOPAQUE_STORAGE'], - str(user.id)) + dir = os.path.join(current_app.config['NOPAQUE_STORAGE'], str(user.id)) try: os.makedirs(dir) except OSError: @@ -41,8 +40,9 @@ def register(): send_email(user.email, 'Confirm Your Account', 'auth/email/confirm', token=token, user=user) flash('A confirmation email has been sent to you by email.') - return redirect(url_for('auth.login')) - return render_template('auth/register.html.j2', form=registration_form, + return redirect(url_for('main.index')) + return render_template('auth/register.html.j2', + registration_form=registration_form, title='Register') @@ -108,7 +108,7 @@ def password_reset_request(): user=user) flash('An email with instructions to reset your password has been ' 'sent to you.') - return redirect(url_for('auth.login')) + return redirect(url_for('main.index')) return render_template('auth/reset_password_request.html.j2', form=form, title='Password Reset') @@ -123,7 +123,7 @@ def password_reset(token): if User.reset_password(token, form.password.data): db.session.commit() flash('Your password has been updated.') - return redirect(url_for('auth.login')) + return redirect(url_for('main.index')) else: return redirect(url_for('main.index')) return render_template('auth/reset_password.html.j2', diff --git a/app/templates/auth/login.html.j2 b/app/templates/auth/login.html.j2 deleted file mode 100644 index 73e4aeac..00000000 --- a/app/templates/auth/login.html.j2 +++ /dev/null @@ -1,49 +0,0 @@ -{% extends "nopaque.html.j2" %} - -{% set full_width = False %} -{% set roadmap = False %} - -{% block page_content %} -
It's free to join and easy to use. Continue on to our registration page to create your Opaque account.
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren,
+Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
+person_addRegister
+
Speeds up your work
-All tools provided by nopaque are carefully selected to provide a complete tool suite without delaying compatibility issues.
+Speeds up your work
+All tools provided by nopaque are carefully selected to provide a complete tool suite without delaying compatibility issues.
+Cloud infrastructure
+All computational work is processed within nopaques cloud infrastructure. You don't need to install any software, great right?
+User Experience Focused
+By utilizing elements and principles of Material Design, we were able to create a framework that focuses on User Experience.
+Easy to work with
+We have provided detailed documentation as well as specific code examples to help new users get started.
+User Experience Focused
-By utilizing elements and principles of Material Design, we were able to create a framework that focuses on User Experience.
+ +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Easy to work with
-We have provided detailed documentation as well as specific code examples to help new users get started.
+ +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
+ help +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
+ help +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
+ help +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
+ help +Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
-Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
-