Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoWzk committed Feb 17, 2019
1 parent 9d7a158 commit b53df7a
Show file tree
Hide file tree
Showing 36 changed files with 25,424 additions and 10 deletions.
8 changes: 8 additions & 0 deletions .idea/flaskblog.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

346 changes: 341 additions & 5 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Binary file added __pycache__/config.cpython-35.pyc
Binary file not shown.
Binary file added app/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file added app/__pycache__/forms.cpython-35.pyc
Binary file not shown.
Binary file added app/__pycache__/models.cpython-35.pyc
Binary file not shown.
20 changes: 20 additions & 0 deletions app/forms.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# encoding: utf-8
# create forms here

from flask_wtf import FlaskForm
from wtforms.validators import DataRequired, EqualTo, Optional, Email, Length
from wtforms import StringField, PasswordField, SubmitField, RadioField


class signupForm(FlaskForm):
email = StringField(validators=[DataRequired(), Email(message='Invalid email add')])
username = StringField(validators=[DataRequired(), Length(3, 15, message='Username length between 3-15')])
password = PasswordField(validators=[DataRequired(), Length(6, 15, message='Password length between 6-15')])
confirm = PasswordField(validators=[DataRequired(), EqualTo('password', message='Password not matches')])
submit = SubmitField()


class loginForm(FlaskForm):
email = StringField(validators=[DataRequired(), Email(message='Invalid email add')])
password = PasswordField(validators=[DataRequired(), Length(6, 15, message='Password length between 6-15')])
submit = SubmitField()
Empty file removed app/index.html
Empty file.
4 changes: 2 additions & 2 deletions app/mails.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
from flask import render_template
from flask_mail import Message
from threading import Thread
from config import config
import os


app = create_app(config['default'])
app = create_app(os.environ.get('FLASK_CONFIG') or 'default')


def async_mail(app, msg):
Expand Down
2 changes: 1 addition & 1 deletion app/main/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

from flask import Blueprint
main = Blueprint('main', __name__)
from . import forms, views
from . import views
Binary file added app/main/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file added app/main/__pycache__/views.cpython-35.pyc
Binary file not shown.
Loading

0 comments on commit b53df7a

Please sign in to comment.