Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2020-101
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
2020-101
2020-101
Commits
96041bdb
Commit
96041bdb
authored
May 16, 2020
by
SohanDanushka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Showing the main states of a selected video from the frontend.
parent
bef01269
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
733 additions
and
621 deletions
+733
-621
LecturerApp/api.py
LecturerApp/api.py
+14
-0
LecturerApp/templates/LecturerApp/index.html
LecturerApp/templates/LecturerApp/index.html
+711
-620
LecturerApp/urls.py
LecturerApp/urls.py
+8
-1
LecturerAssets/LecturerApp/images/loader.png
LecturerAssets/LecturerApp/images/loader.png
+0
-0
No files found.
LecturerApp/api.py
0 → 100644
View file @
96041bdb
from
rest_framework.views
import
APIView
from
rest_framework.response
import
Response
from
.
logic
import
classroom_activity
class
ActivityRecognitionAPI
(
APIView
):
def
get
(
self
,
request
):
pass
def
post
(
self
,
request
):
video_name
=
request
.
data
[
'video_name'
]
percentages
=
classroom_activity
.
activity_recognition
(
video_name
)
return
Response
({
"response"
:
percentages
})
\ No newline at end of file
LecturerApp/templates/LecturerApp/index.html
View file @
96041bdb
This diff is collapsed.
Click to expand it.
LecturerApp/urls.py
View file @
96041bdb
...
...
@@ -2,10 +2,11 @@ from django.urls import path, re_path, include
from
.
import
views
from
rest_framework
import
routers
from
django.conf.urls
import
url
from
.
import
api
#
router = routers.DefaultRouter()
router
=
routers
.
DefaultRouter
()
# router.register(r'^register', views.register)
urlpatterns
=
[
...
...
@@ -23,4 +24,10 @@ urlpatterns = [
path
(
'base'
,
views
.
base
),
path
(
'child'
,
views
.
child
),
# path('Video', views.hello)
# API to retrieve activity recognition
url
(
r'^activities'
,
api
.
ActivityRecognitionAPI
.
as_view
()),
path
(
'api-auth/'
,
include
(
'rest_framework.urls'
,
namespace
=
'rest_framework'
))
]
\ No newline at end of file
LecturerAssets/LecturerApp/images/loader.png
0 → 100644
View file @
96041bdb
1.9 KB
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