Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated deprecated package names and updated requirements.txt #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions flask_application/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,27 @@
Bootstrap(app)

# Assets
from flask.ext.assets import Environment
from flask_assets import Environment
assets = Environment(app)
# Ensure output directory exists
assets_output_dir = os.path.join(FLASK_APP_DIR, '..', 'static', 'gen')
if not os.path.exists(assets_output_dir):
os.mkdir(assets_output_dir)

# Email
from flask.ext.mail import Mail
from flask_mail import Mail
app.mail = Mail(app)

# Memcache
from flask.ext.cache import Cache
from flask_cache import Cache
app.cache = Cache(app)

# MongoEngine
from flask_application.models import db
app.db = db
app.db.init_app(app)

from flask.ext.security import Security, MongoEngineUserDatastore
from flask_security import Security, MongoEngineUserDatastore
from flask_application.users.models import User, Role

# Setup Flask-Security
Expand Down
2 changes: 1 addition & 1 deletion flask_application/admin/controllers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import Blueprint
from flask.ext.security import roles_required, roles_accepted
from flask_security import roles_required, roles_accepted

from flask_application.controllers import TemplateView

Expand Down
2 changes: 1 addition & 1 deletion flask_application/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask.ext.mongoengine import MongoEngine
from flask_mongoengine import MongoEngine

db = MongoEngine()

Expand Down
4 changes: 2 additions & 2 deletions flask_application/script.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from flask import current_app

from flask.ext.script import Command
from flask.ext.security.confirmable import confirm_user
from flask_script import Command
from flask_security.confirmable import confirm_user

from flask_application.models import FlaskDocument

Expand Down
2 changes: 1 addition & 1 deletion flask_application/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flask import current_app

from flask.ext.testing import TestCase
from flask_testing import TestCase

from flask_application import app
from flask_application.script import ResetDB, PopulateDB
Expand Down
2 changes: 1 addition & 1 deletion flask_application/tests/script.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import nose
import sys

from flask.ext.script import Command
from flask_script import Command


class RunTests(Command):
Expand Down
2 changes: 1 addition & 1 deletion flask_application/users/controllers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flask import Blueprint

from flask.ext.security import login_required
from flask_security import login_required

from flask_application.controllers import TemplateView

Expand Down
2 changes: 1 addition & 1 deletion flask_application/users/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask.ext.security import UserMixin, RoleMixin
from flask_security import UserMixin, RoleMixin

from flask_application.models import db, FlaskDocument

Expand Down
6 changes: 3 additions & 3 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
from flask.ext.script import Manager
from flask.ext.script.commands import Server, Shell, ShowUrls, Clean
from flask.ext.security.script import CreateUserCommand, AddRoleCommand,\
from flask_script import Manager
from flask_script.commands import Server, Shell, ShowUrls, Clean
from flask_security.script import CreateUserCommand, AddRoleCommand,\
RemoveRoleCommand, ActivateUserCommand, DeactivateUserCommand

from flask_application import app
Expand Down
59 changes: 34 additions & 25 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
Flask==0.10.1
Flask-Assets==0.10
Flask-Bootstrap==3.3.0.1
Babel==2.5.3
blinker==1.4
click==6.7
cssmin==0.2.0
dominate==2.3.1
flake8==3.5.0
Flask==0.12.2
Flask-Assets==0.12
Flask-BabelEx==0.9.3
Flask-Bootstrap==3.3.7.1
Flask-Cache==0.13.1
Flask-Login==0.2.11
Flask-Login==0.4.1
Flask-Mail==0.9.1
flask-mongoengine==0.9.5
Flask-Principal==0.4.0
Flask-Script==2.0.5
Flask-Security==1.7.3
Flask-Testing==0.4.2
Flask-WTF==0.9.5
Jinja2==2.7.3
MarkupSafe==0.23
WTForms==2.0.1
Werkzeug==0.9.6
blinker==1.3
cssmin==0.2.0
flake8==2.2.5
flask-mongoengine==0.7.1
gunicorn==19.1.1
Flask-Script==2.0.6
Flask-Security==3.0.0
Flask-Testing==0.7.1
Flask-WTF==0.14.2
gunicorn==19.7.1
itsdangerous==0.24
mccabe==0.2.1
mongoengine==0.8.7
nose==1.3.4
passlib==1.6.2
pep8==1.5.7
pyflakes==0.8.1
pymongo==2.7.2
webassets==0.10.1
Jinja2==2.10
MarkupSafe==1.0
mccabe==0.6.1
mongoengine==0.15.0
nose==1.3.7
passlib==1.7.1
pep8==1.7.1
pycodestyle==2.3.1
pyflakes==1.6.0
pymongo==3.6.1
pytz==2018.3
six==1.11.0
speaklater==1.3
visitor==0.1.3
webassets==0.12.1
Werkzeug==0.14.1
WTForms==2.1
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.4.1
python-3.6.3
4 changes: 2 additions & 2 deletions templates/security/_menu.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ul class="nav navbar-nav navbar-right">
{%- if current_user.is_authenticated() -%}
{%- if current_user.is_authenticated -%}
<li><a href="{{ url_for('users.profile') }}">Hello {{ current_user.email }} (Profile)</a></li>
{%- endif %}

Expand All @@ -11,7 +11,7 @@
<li><a href="{{ url_for('admin.admin_or_editor') }}">Admin or Editor</a></li>
{% endif -%}

{%- if current_user.is_authenticated() -%}
{%- if current_user.is_authenticated -%}
<li><a href="{{ url_for('security.logout') }}">Logout</a></li>
{%- else -%}
{% if security.registerable %}
Expand Down