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
Sachith Fernando
2020-101
Commits
99a8496c
Commit
99a8496c
authored
Jan 09, 2021
by
LiniEisha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate
parent
c217af8f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
LectureSummarizingApp/api.py
LectureSummarizingApp/api.py
+18
-1
No files found.
LectureSummarizingApp/api.py
View file @
99a8496c
...
@@ -24,7 +24,24 @@ class LectureAudioAPI(APIView):
...
@@ -24,7 +24,24 @@ class LectureAudioAPI(APIView):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
lecture_audio
=
LectureAudio
.
objects
.
all
()
.
order_by
(
'lecturer_date'
)
lecture_audio
=
LectureAudio
.
objects
.
all
()
.
order_by
(
'lecturer_date'
)
lecture_audio_serializer
=
LectureAudioSerializer
(
lecture_audio
,
many
=
True
)
lecture_audio_serializer
=
LectureAudioSerializer
(
lecture_audio
,
many
=
True
)
return
Response
(
lecture_audio_serializer
.
data
)
audio_list
=
LectureAudio
.
objects
.
order_by
(
'lecture_audio_id'
)
.
last
()
audio_name
=
request
.
query_params
.
get
(
"audio_name"
)
# id = int(request.query_params.get("id"))
new_audio_id
=
generate_new_id
(
audio_list
.
lecture_audio_noise_removed_id
)
fake_duration
=
datetime
.
timedelta
(
minutes
=
00
,
seconds
=
10
,
milliseconds
=
00
)
LectureAudio
(
lecture_audio_id
=
new_audio_id
,
lecture_audio_name
=
audio_name
,
lecture_audio_length
=
fake_duration
,
lecturer
=
request
.
data
[
"lecturer"
],
subject
=
request
.
data
[
"subject"
]
)
.
save
()
return
Response
({
"response"
:
Response
.
status_code
})
...
...
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