Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Web - Open
drf-sqla
Commits
94737c50
Commit
94737c50
authored
Oct 16, 2014
by
Ashish
Browse files
Change to use read-only router for data-apis
parent
fd9920ab
Changes
1
Show whitespace changes
Inline
Side-by-side
djangorest_alchemy/apibuilder.py
View file @
94737c50
...
...
@@ -4,7 +4,7 @@ Build dynamic API based on the provided SQLAlchemy model
"""
from
managers
import
AlchemyModelManager
from
viewsets
import
AlchemyModelViewSet
from
r
est_framework_nested
import
r
outer
s
from
r
outers
import
ReadOnlyR
outer
class
APIModelBuilder
(
object
):
...
...
@@ -27,7 +27,7 @@ class APIModelBuilder(object):
@
property
def
urls
(
self
):
router
=
routers
.
Simple
Router
()
router
=
ReadOnly
Router
()
for
model
in
self
.
models
:
manager
=
type
(
...
...
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