Skip to content

Commit ff1e775

Browse files
committed
UPDATE admin
1 parent 2b74101 commit ff1e775

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

prototipo/projeto/ext/admin/__init__.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@
66

77
admin = Admin(name="Dashboard", template_mode="bootstrap3")
88

9-
views = [
10-
UserView(UserAuth, db.session),
11-
EstacaoView(Estacao, db.session),
12-
SensorView(Sensor, db.session),
13-
]
14-
admin.add_views(*views)
15-
169

1710
def init_app(app):
1811
admin.init_app(app)
12+
views = [
13+
UserView(UserAuth, db.session),
14+
EstacaoView(Estacao, db.session),
15+
SensorView(Sensor, db.session),
16+
]
17+
admin.add_views(*views)

prototipo/projeto/ext/admin/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
class AdminView(ModelView):
77
@login_required
88
def is_accessible(self):
9-
print(current_user.is_authenticated)
10-
print(current_user.is_admin)
119
if current_user.is_authenticated and current_user.is_admin:
1210
return True
1311
return False

0 commit comments

Comments
 (0)