Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
ADIM
Commits
802114b7
Commit
802114b7
authored
Apr 20, 2015
by
Julien Furrer
Browse files
Fixed compat drf 3.1
parent
d72b4819
Changes
2
Hide whitespace changes
Inline
Side-by-side
adim/serializers.py
View file @
802114b7
...
...
@@ -58,6 +58,7 @@ class BaseAnObjSerializer(serializers.ModelSerializer):
class
Meta
:
model
=
AnObj
fields
=
(
'id'
,
'uuid'
,
'name'
,
'owner'
,
'owner_name'
,
'annotations'
,
'sharing_mode'
,
'locked'
)
read_only_fields
=
(
'members'
,)
def
get_annotations
(
self
,
anobj
):
request
=
self
.
context
.
get
(
'request'
)
...
...
@@ -99,7 +100,7 @@ class BaseAnObjSerializer(serializers.ModelSerializer):
class
AnObjSerializer
(
BaseAnObjSerializer
):
members
=
UserSerializer
(
many
=
True
,
required
=
False
)
# , allow_add_remove=True) #
read_only=True)
members
=
UserSerializer
(
many
=
True
,
required
=
False
,
read_only
=
True
)
class
Meta
:
model
=
AnObj
...
...
adim_app/static/_src/adim/io.js
View file @
802114b7
...
...
@@ -149,7 +149,7 @@ function ($, paper, Signal, Config, view) {
url
:
Config
.
api
.
annotables
+
(
parseInt
(
aid
,
10
))
+
"
/
"
,
type
:
"
PATCH
"
,
dataType
:
'
json
'
,
data
:
{
name
:
name
},
data
:
{
'
name
'
:
name
},
success
:
function
(
data
)
{
_events
.
annotableChanged
.
dispatch
(
data
);
}
...
...
Write
Preview
Supports
Markdown
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