Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
PyPrevention
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
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sr04
PyPrevention
Commits
66c1d506
Commit
66c1d506
authored
Nov 30, 2018
by
Hive
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handler 404
parent
45cc3a19
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
20 additions
and
4 deletions
+20
-4
pyprevention/dashboard/__pycache__/urls.cpython-36.pyc
pyprevention/dashboard/__pycache__/urls.cpython-36.pyc
+0
-0
pyprevention/dashboard/__pycache__/views.cpython-36.pyc
pyprevention/dashboard/__pycache__/views.cpython-36.pyc
+0
-0
pyprevention/dashboard/static/404.png
pyprevention/dashboard/static/404.png
+0
-0
pyprevention/dashboard/templates/404.html
pyprevention/dashboard/templates/404.html
+4
-4
pyprevention/dashboard/urls.py
pyprevention/dashboard/urls.py
+5
-0
pyprevention/dashboard/views.py
pyprevention/dashboard/views.py
+11
-0
pyprevention/db.sqlite3
pyprevention/db.sqlite3
+0
-0
pyprevention/pyprevention/__pycache__/settings.cpython-36.pyc
...evention/pyprevention/__pycache__/settings.cpython-36.pyc
+0
-0
No files found.
pyprevention/dashboard/__pycache__/urls.cpython-36.pyc
View file @
66c1d506
No preview for this file type
pyprevention/dashboard/__pycache__/views.cpython-36.pyc
View file @
66c1d506
No preview for this file type
pyprevention/dashboard/static/404.png
0 → 100644
View file @
66c1d506
38.8 KB
pyprevention/dashboard/templates/404.html
View file @
66c1d506
{% extends 'base.html' %}
{% load static %}
{% block content %}
<div
class=
"container"
>
<div
class=
"jumbotron mt-5"
>
<
h1
class=
"display-4"
>
404 maggle
</h1
>
</div
>
<center
>
<
img
src=
"{% static "
404.
png
"
%}"
alt=
"404"
>
</center
>
</div>
{% endblock %}
pyprevention/dashboard/urls.py
View file @
66c1d506
...
...
@@ -7,6 +7,7 @@ urlpatterns = [
path
(
''
,
views
.
index
,
name
=
'index'
),
path
(
'api'
,
views
.
api
,
name
=
'api'
),
path
(
'test'
,
views
.
test
,
name
=
'test'
),
path
(
'plot'
,
views
.
test2
,
name
=
'test2'
),
path
(
'logout'
,
views
.
logout_view
,
name
=
'logout'
),
path
(
'home'
,
views
.
home
,
name
=
'home'
),
path
(
'patient/new'
,
views
.
patient_new
,
name
=
'patient_new'
),
...
...
@@ -22,4 +23,8 @@ urlpatterns = [
path
(
'update/raspi/<int:id>'
,
views
.
update_raspi
,
name
=
'update_raspi'
),
path
(
'update/doctor/<int:id>'
,
views
.
update_doctor
,
name
=
'update_doctor'
),
path
(
'update/patient/<int:id>'
,
views
.
update_patient
,
name
=
'update_patient'
),
path
(
'ok'
,
views
.
handler404
,
name
=
'ok'
),
]
handler404
=
views
.
handler404
handler500
=
views
.
handler500
pyprevention/dashboard/views.py
View file @
66c1d506
...
...
@@ -7,6 +7,8 @@ from .models import *
import
random
from
collections
import
OrderedDict
from
.fusioncharts
import
FusionCharts
import
plotly.offline
as
opy
import
plotly.graph_objs
as
go
def
patient_new
(
request
):
if
request
.
method
==
"POST"
:
...
...
@@ -48,6 +50,9 @@ def test(request):
# which is used to generate chart in the browsers.
return
render
(
request
,
'dashboard_test.html'
,
{
'output'
:
column2d
.
render
()})
def
test2
(
request
):
return
render
(
request
,
'dashboard_test.html'
)
def
doctor_new
(
request
):
if
request
.
method
==
"POST"
:
form
=
DoctorForm
(
request
.
POST
)
...
...
@@ -165,3 +170,9 @@ def update_doctor(request, id):
else
:
form
=
DoctorForm
(
request
.
POST
or
None
,
instance
=
instance
)
return
render
(
request
,
'doctor_add.html'
,
{
'form'
:
form
})
def
handler404
(
request
):
return
render
(
request
,
'404.html'
)
def
handler500
(
request
):
return
render
(
request
,
'404.html'
)
pyprevention/db.sqlite3
View file @
66c1d506
No preview for this file type
pyprevention/pyprevention/__pycache__/settings.cpython-36.pyc
View file @
66c1d506
No preview for this file type
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