Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EV3WebController
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Science Festival 2015
EV3WebController
Commits
60fd3714
Unverified
Commit
60fd3714
authored
Oct 31, 2015
by
Cédric Bonhomme
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
about -> index
parent
bf082f02
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
web/views/views.py
web/views/views.py
+6
-6
No files found.
web/views/views.py
View file @
60fd3714
...
...
@@ -28,19 +28,19 @@ from web import app
from
web
import
right_wheel
,
left_wheel
,
button
,
ir_sensor
login_manager
=
LoginManager
(
app
)
login_manager
.
login_view
=
'
login
'
login_manager
.
login_view
=
'
index
'
login_manager
.
login_message
=
'Please log in to access this page.'
login_manager
.
login_message_category
=
'danger'
@
app
.
errorhandler
(
403
)
def
authentication_failed
(
e
):
flash
(
'You do not have enough rights.'
,
'danger'
)
return
redirect
(
url_for
(
'
about
'
))
return
redirect
(
url_for
(
'
index
'
))
@
app
.
errorhandler
(
401
)
def
authentication_required
(
e
):
flash
(
'Authenticated required.'
,
'info'
)
return
redirect
(
url_for
(
'
about
'
))
return
redirect
(
url_for
(
'
index
'
))
@
login_manager
.
user_loader
def
load_user
(
id
):
...
...
@@ -103,6 +103,6 @@ def sensor(sensor_name=""):
return
{
"message"
:
"Unknown sensor"
},
400
@
app
.
route
(
'/
about
'
,
methods
=
[
'GET'
])
def
about
():
return
render_template
(
'
about
.html'
)
@
app
.
route
(
'/'
,
methods
=
[
'GET'
])
def
index
():
return
render_template
(
'
index
.html'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment