File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
prototipo/projeto/ext/admin Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 66
77admin = 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
1710def 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 )
Original file line number Diff line number Diff line change 66class 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
You can’t perform that action at this time.
0 commit comments