Commit 66c1d506 authored by Hive's avatar Hive

Handler 404

parent 45cc3a19
{% 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 %}
......@@ -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
......@@ -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')
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment