From 88d8ee69b79fb59cbafe608338e004af1196977b Mon Sep 17 00:00:00 2001
From: Wagner Augusto Andreoli <wagnerandreoli@gmail.com>
Date: Wed, 4 Nov 2015 02:20:28 +0100
Subject: [PATCH] Update requirements, pin modules to the latest version, plus
 two small fixes

---
 .gitignore                                    |  3 +++
 {{cookiecutter.app_name}}/.gitignore          |  4 ++++
 .../requirements/dev.txt                      |  8 +++----
 .../requirements/prod.txt                     | 21 +++++++++++--------
 .../{{cookiecutter.app_name}}/database.py     |  2 +-
 .../templates/nav.html                        |  2 +-
 6 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/.gitignore b/.gitignore
index 9fa7d127..27dd348b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,3 +45,6 @@ output/
 
 myflaskapp/
 bower_components
+
+# PyCharm
+.idea/
diff --git a/{{cookiecutter.app_name}}/.gitignore b/{{cookiecutter.app_name}}/.gitignore
index 0feb8dd4..db6f1202 100644
--- a/{{cookiecutter.app_name}}/.gitignore
+++ b/{{cookiecutter.app_name}}/.gitignore
@@ -44,3 +44,7 @@ docs/_build
 
 # Virtualenvs
 env/
+.venv
+
+# PyCharm
+.idea/
diff --git a/{{cookiecutter.app_name}}/requirements/dev.txt b/{{cookiecutter.app_name}}/requirements/dev.txt
index bdd8325b..11f74bb1 100644
--- a/{{cookiecutter.app_name}}/requirements/dev.txt
+++ b/{{cookiecutter.app_name}}/requirements/dev.txt
@@ -2,9 +2,9 @@
 -r prod.txt
 
 # Testing
-pytest>=2.6.3
-webtest
-factory-boy==2.5.1
+pytest==2.8.2
+WebTest==2.0.20
+factory-boy==2.6.0
 
 # Management script
-Flask-Script
+Flask-Script==2.0.5
diff --git a/{{cookiecutter.app_name}}/requirements/prod.txt b/{{cookiecutter.app_name}}/requirements/prod.txt
index 174f8288..83b59cfb 100644
--- a/{{cookiecutter.app_name}}/requirements/prod.txt
+++ b/{{cookiecutter.app_name}}/requirements/prod.txt
@@ -1,37 +1,40 @@
 # Everything needed in production
 
+setuptools==18.5
+wheel==0.26.0
+
 # Flask
 Flask==0.10.1
 MarkupSafe==0.23
 Werkzeug==0.10.4
-Jinja2==2.7.3
+Jinja2==2.8
 itsdangerous==0.24
 
 # Database
-Flask-SQLAlchemy==2.0
-SQLAlchemy==0.9.8
+Flask-SQLAlchemy==2.1
+SQLAlchemy==1.0.9
 
 # Migrations
-Flask-Migrate==1.3.1
+Flask-Migrate==1.6.0
 
 # Forms
-Flask-WTF==0.11
+Flask-WTF==0.12
 WTForms==2.0.2
 
 # Deployment
 gunicorn>=19.1.1
 
 # Assets
-Flask-Assets==0.10
+Flask-Assets==0.11
 cssmin>=0.2.0
 jsmin>=2.0.11
 
 # Auth
-Flask-Login==0.2.11
-Flask-Bcrypt==0.6.2
+Flask-Login==0.3.2
+Flask-Bcrypt==0.7.1
 
 # Caching
 Flask-Cache>=0.13.1
 
 # Debug toolbar
-Flask-DebugToolbar==0.9.2
+Flask-DebugToolbar==0.10.0
diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/database.py b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/database.py
index 09f7f390..5d88d4d4 100644
--- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/database.py
+++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/database.py
@@ -25,7 +25,7 @@ class CRUDMixin(object):
 
     def update(self, commit=True, **kwargs):
         """Update specific fields of a record."""
-        for attr, value in kwargs.iteritems():
+        for attr, value in kwargs.items():
             setattr(self, attr, value)
         return commit and self.save() or self
 
diff --git a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/nav.html b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/nav.html
index f54bab10..57ed624e 100644
--- a/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/nav.html
+++ b/{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/nav.html
@@ -22,7 +22,7 @@
       <li><a href="{{ url_for('public.home') }}">Home</a></li>
       <li><a href="{{ url_for('public.about') }}">About</a></li>
     </ul>
-    {% if current_user and current_user.is_authenticated() %}
+    {% if current_user and current_user.is_authenticated %}
     <ul class="nav navbar-nav navbar-right">
         <li>
             <p class="navbar-text"><a class="navbar-link" href="{{ url_for('user.members') }}">Logged in as {{ current_user.username }}</a></p>
-- 
GitLab