Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7aabb3e

Browse files
committedMar 1, 2014
updates
1 parent 15d32a3 commit 7aabb3e

File tree

3 files changed

+28
-24
lines changed

3 files changed

+28
-24
lines changed
 

‎README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Welcome
2-
-------
1+
## Welcome
2+
33
Hello. Want to get started with Flask quickly? Good. You came to the right place. This Flask application framework is pre-configured with **Flask-SQLAlchemy**, **Flask-WTF**, **Fabric**, **Coverage**, and the **Bootstrap** frontend (among others). This will get your Flask app up and running on Heroku or PythonAnywhere quickly. Use this starter, boilerplate for all you new Flask projects. Cheers!
44

55
Preview the skeleton app here - [http://www.flaskboilerplate.com/](http://www.flaskboilerplate.com/)
@@ -71,38 +71,40 @@ Project Structure
7171
└── placeholder.home.html
7272
```
7373

74-
Screenshots
75-
-----------
74+
### Screenshots
7675

7776
![Pages](https://raw.github.com/mjhea0/flask-boilerplate/master/screenshots/pages.png)
7877

7978
![Forms](https://raw.github.com/mjhea0/flask-boilerplate/master/screenshots/forms.png)
8079

8180

82-
Quick Start
83-
----------
81+
### Quick Start
8482

8583
1. Clone the repo
86-
```sh
84+
```
8785
$ git clone git@github.com:mjhea0/flask-boilerplate.git
8886
$ cd flask-boilerplate
8987
```
9088

9189
2. Initialize and activate a virtualenv:
90+
```
91+
$ virtualenv --no-site-packages env
92+
$ source env/bin/activate
93+
```
9294

93-
$ virtualenv --no-site-packages env
94-
$ source env/bin/activate
95-
96-
4. Install the dependencies:
97-
98-
$ pip install -r requirements.txt
95+
3. Install the dependencies:
96+
```
97+
$ pip install -r requirements.txt
98+
```
9999

100100
5. Run the development server:
101+
```
102+
$ python app.py
103+
```
101104

102-
$ python app.py
103-
104105
6. Navigate to [http://localhost:5000](http://localhost:5000)
105106

107+
106108
Deploying to Heroku
107109
------
108110

‎forms.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
from flask.ext.wtf import Form, TextField, PasswordField
2-
from flask.ext.wtf import Required, EqualTo, validators, Length
1+
from flask_wtf import Form
2+
from wtforms import TextField, DateField, IntegerField, \
3+
SelectField, PasswordField
4+
from wtforms.validators import DataRequired, EqualTo, Length
35

46
# Set your classes here.
57

68
class RegisterForm(Form):
7-
name = TextField('Username', validators = [Required(), Length(min=6, max=25)])
8-
email = TextField('Email', validators = [Required(), Length(min=6, max=40)])
9-
password = PasswordField('Password', validators = [Required(), Length(min=6, max=40)])
10-
confirm = PasswordField('Repeat Password', [Required(), EqualTo('password', message='Passwords must match')])
9+
name = TextField('Username', validators = [DataRequired(), Length(min=6, max=25)])
10+
email = TextField('Email', validators = [DataRequired(), Length(min=6, max=40)])
11+
password = PasswordField('Password', validators = [DataRequired(), Length(min=6, max=40)])
12+
confirm = PasswordField('Repeat Password', [DataRequired(), EqualTo('password', message='Passwords must match')])
1113

1214
class LoginForm(Form):
13-
name = TextField('Username', [Required()])
14-
password = PasswordField('Password', [Required()])
15+
name = TextField('Username', [DataRequired()])
16+
password = PasswordField('Password', [DataRequired()])
1517

1618
class ForgotForm(Form):
17-
email = TextField('Email', validators = [Required(), Length(min=6, max=40)])
19+
email = TextField('Email', validators = [DataRequired(), Length(min=6, max=40)])

‎screenshots/pages.png

-10.8 MB
Loading

0 commit comments

Comments
 (0)
Please sign in to comment.