Permalink
Browse files

updates

  • Loading branch information...
1 parent 15d32a3 commit 7aabb3ed0c240942372b8cb720dbc334d49b15de @mjhea0 committed Mar 1, 2014
Showing with 28 additions and 24 deletions.
  1. +17 −15 README.md
  2. +11 −9 forms.py
  3. BIN screenshots/pages.png
View
@@ -1,5 +1,5 @@
-Welcome
--------
+## Welcome
+
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!
Preview the skeleton app here - [http://www.flaskboilerplate.com/](http://www.flaskboilerplate.com/)
@@ -71,38 +71,40 @@ Project Structure
└── placeholder.home.html
```
-Screenshots
------------
+### Screenshots
![Pages](https://raw.github.com/mjhea0/flask-boilerplate/master/screenshots/pages.png)
![Forms](https://raw.github.com/mjhea0/flask-boilerplate/master/screenshots/forms.png)
-Quick Start
-----------
+### Quick Start
1. Clone the repo
- ```sh
+ ```
$ git clone git@github.com:mjhea0/flask-boilerplate.git
$ cd flask-boilerplate
```
2. Initialize and activate a virtualenv:
+ ```
+ $ virtualenv --no-site-packages env
+ $ source env/bin/activate
+ ```
- $ virtualenv --no-site-packages env
- $ source env/bin/activate
-
-4. Install the dependencies:
-
- $ pip install -r requirements.txt
+3. Install the dependencies:
+ ```
+ $ pip install -r requirements.txt
+ ```
5. Run the development server:
+ ```
+ $ python app.py
+ ```
- $ python app.py
-
6. Navigate to [http://localhost:5000](http://localhost:5000)
+
Deploying to Heroku
------
View
@@ -1,17 +1,19 @@
-from flask.ext.wtf import Form, TextField, PasswordField
-from flask.ext.wtf import Required, EqualTo, validators, Length
+from flask_wtf import Form
+from wtforms import TextField, DateField, IntegerField, \
+ SelectField, PasswordField
+from wtforms.validators import DataRequired, EqualTo, Length
# Set your classes here.
class RegisterForm(Form):
- name = TextField('Username', validators = [Required(), Length(min=6, max=25)])
- email = TextField('Email', validators = [Required(), Length(min=6, max=40)])
- password = PasswordField('Password', validators = [Required(), Length(min=6, max=40)])
- confirm = PasswordField('Repeat Password', [Required(), EqualTo('password', message='Passwords must match')])
+ name = TextField('Username', validators = [DataRequired(), Length(min=6, max=25)])
+ email = TextField('Email', validators = [DataRequired(), Length(min=6, max=40)])
+ password = PasswordField('Password', validators = [DataRequired(), Length(min=6, max=40)])
+ confirm = PasswordField('Repeat Password', [DataRequired(), EqualTo('password', message='Passwords must match')])
class LoginForm(Form):
- name = TextField('Username', [Required()])
- password = PasswordField('Password', [Required()])
+ name = TextField('Username', [DataRequired()])
+ password = PasswordField('Password', [DataRequired()])
class ForgotForm(Form):
- email = TextField('Email', validators = [Required(), Length(min=6, max=40)])
+ email = TextField('Email', validators = [DataRequired(), Length(min=6, max=40)])
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7aabb3e

Please sign in to comment.