3 ms·
You can also route only read-only methods in urls.py, for example via: url( r'path/$', TheModelViewSetView.as_view({"get": "list"}),
by qnrq 10y ago
You can also route only read-only methods in urls.py, for example via:
url(
r'path/$',
TheModelViewSetView.as_view({"get": "list"}),
name="thename"
)
or "retrieve" instead of "list" for a route which includes PK.
This of course makes the entire path read-only so it's not a way to make some fields writable and others not.