Skip to content

Commit

Permalink
update flask-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
emillon committed Feb 7, 2015
1 parent 72fda44 commit 9156362
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ def configure_ext_admin(app):
]

class RestrictedModelView(ModelView):
def __init__(self, *args, **kwargs):
super(RestrictedModelView, self).__init__(*args, **kwargs)
self.endpoint += '_admin'

def is_accessible(self):
return current_user.is_authenticated() and current_user.is_admin()

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
coverage==3.7.1
fake-factory==0.4.2
Flask==0.10.1
Flask-Admin==1.0.8
Flask-Admin==1.0.9
Flask-Assets==0.10
Flask-Bcrypt==0.6.0
Flask-Login==0.2.11
Expand Down

0 comments on commit 9156362

Please sign in to comment.