Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MOOC packages by hacklab
django-courses
Commits
13338872
Commit
13338872
authored
Apr 22, 2021
by
Glaucia S. Santos
Browse files
Fix to save text of material
parent
ef2beb5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
courses/course_material/views.py
courses/course_material/views.py
+5
-0
No files found.
courses/course_material/views.py
View file @
13338872
...
...
@@ -20,6 +20,11 @@ class CourseMaterialViewSet(viewsets.ModelViewSet):
self
.
kwargs
[
'course'
]
=
obj
.
course
return
super
(
CourseMaterialViewSet
,
self
).
pre_save
(
obj
)
def
perform_update
(
self
,
serializer
):
instance
=
CourseMaterial
.
objects
.
get
(
id
=
self
.
request
.
data
[
'id'
])
instance
.
text
=
self
.
request
.
data
[
'text'
]
instance
.
save
()
class
CourseMaterialFileViewSet
(
viewsets
.
ModelViewSet
):
model
=
CourseMaterialFile
...
...
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