Commit d9b754ea authored by I.K Seneviratne's avatar I.K Seneviratne

Merge remote-tracking branch 'origin/QA_RELEASE' into monitoring_student_behavior_IT17138000

parents f99b928b b6e6d565
{% extends 'FirstApp/template.html' %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>SLPES</title>
{% load static %}
<!-- Custom fonts for this template-->
<link rel="shortcut icon" href="{% static 'FirstApp/images/favicon.ico' %}" type="image/x-icon"/>
<link href="{% static 'FirstApp/css/all.min.css' %}" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
rel="stylesheet">
<!-- Custom styles for this template-->
<link href="{% static 'FirstApp/css/sb-admin-2.min.css' %}" rel="stylesheet">
</head>
<body id="page-top"> <body id="page-top">
{% block javascript %}
{% load static %}
<!-- Bootstrap core JavaScript--> <!-- Bootstrap core JavaScript-->
<script src="{% static 'FirstApp/vendor/jquery/jquery.min.js' %}"></script> <script src="{% static 'FirstApp/vendor/jquery/jquery.min.js' %}"></script>
<script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script> <script src="{% static 'FirstApp/vendor/bootstrap/js/bootstrap.bundle.min.js' %}"></script>
...@@ -321,6 +302,8 @@ ...@@ -321,6 +302,8 @@
}); });
</script> </script>
{% endblock %}
<!-- Page Wrapper --> <!-- Page Wrapper -->
<div id="wrapper"> <div id="wrapper">
...@@ -392,7 +375,8 @@ ...@@ -392,7 +375,8 @@
<!-- End of Topbar --> <!-- End of Topbar -->
{% block 'container-fluid' %}
{% load static %}
<!-- Begin Page Content --> <!-- Begin Page Content -->
<div class="container-fluid"> <div class="container-fluid">
...@@ -647,6 +631,7 @@ ...@@ -647,6 +631,7 @@
</div> </div>
<!-- /.container-fluid --> <!-- /.container-fluid -->
{% endblock %}
</div> </div>
<!-- End of Main Content --> <!-- End of Main Content -->
...@@ -667,6 +652,8 @@ ...@@ -667,6 +652,8 @@
</div> </div>
<!-- End of Page Wrapper --> <!-- End of Page Wrapper -->
{% block 'modal' %}
<!-- Scroll to Top Button--> <!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top"> <a class="scroll-to-top rounded" href="#page-top">
<i class="fas fa-angle-up"></i> <i class="fas fa-angle-up"></i>
...@@ -686,7 +673,7 @@ ...@@ -686,7 +673,7 @@
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div> <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button> <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
<a class="btn btn-primary" href="login.html">Logout</a> <a class="btn btn-primary" href="/logout">Logout</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -870,6 +857,9 @@ ...@@ -870,6 +857,9 @@
<script src="{% static 'FirstApp/js/demo/chart-area-demo.js' %}"></script> <script src="{% static 'FirstApp/js/demo/chart-area-demo.js' %}"></script>
<script src="{% static 'FirstApp/js/demo/chart-pie-demo.js' %}"></script> <script src="{% static 'FirstApp/js/demo/chart-pie-demo.js' %}"></script>
{% endblock %}
</body> </body>
</html> </html>
...@@ -154,6 +154,8 @@ ...@@ -154,6 +154,8 @@
<tbody> <tbody>
{% for video in Videos %} {% for video in Videos %}
{# {% for video in lecturer_videos %} #}
<tr> <tr>
<td>{{video.name}}</td> <td>{{video.name}}</td>
<td>{{video.duration}}</td> <td>{{video.duration}}</td>
......
from django.shortcuts import render from django.shortcuts import render, redirect
from django.http import HttpResponse from django.http import HttpResponse
from django.conf.urls import url from django.conf.urls import url
from rest_framework import routers from rest_framework import routers
...@@ -43,6 +43,11 @@ def startup (request) : ...@@ -43,6 +43,11 @@ def startup (request) :
def hello(request): def hello(request):
# page = '<h1>THIS IS MY HOME</h1>' + '<h2> Hello Ishan</h2>' + '<button>Click Me</button>' # page = '<h1>THIS IS MY HOME</h1>' + '<h2> Hello Ishan</h2>' + '<button>Click Me</button>'
try:
admin = request.session['admin']
obj = {'Message': 'Student and Lecturer Performance Enhancement System'} obj = {'Message': 'Student and Lecturer Performance Enhancement System'}
folder = os.path.join(BASE_DIR, os.path.join('static\\FirstApp\\lecturer_videos')) folder = os.path.join(BASE_DIR, os.path.join('static\\FirstApp\\lecturer_videos'))
videoPaths = [os.path.join(folder, file) for file in os.listdir(folder)] videoPaths = [os.path.join(folder, file) for file in os.listdir(folder)]
...@@ -106,6 +111,15 @@ def hello(request): ...@@ -106,6 +111,15 @@ def hello(request):
context = {'object': obj, 'Videos': videos, 'durations': durations, 'template_name': 'MonitorLecturerApp/template.html', 'lec_list': lec_list} context = {'object': obj, 'Videos': videos, 'durations': durations, 'template_name': 'MonitorLecturerApp/template.html', 'lec_list': lec_list}
return render(request, 'MonitorLecturerApp/index.html', context) return render(request, 'MonitorLecturerApp/index.html', context)
# in case the 'admin' session is not there
except KeyError as exc:
return redirect('/401')
# in case of general exceptions
except Exception as exc:
print('exception: ', exc)
return redirect('/500')
def view404(request): def view404(request):
return render(request, 'MonitorLecturerApp/404.html') return render(request, 'MonitorLecturerApp/404.html')
......
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