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
f0cbfe14
Commit
f0cbfe14
authored
Sep 16, 2014
by
Miroslav Shubernetskiy
Browse files
added base sqlalchemy manager base
parent
bb13fa17
Changes
1
Hide whitespace changes
Inline
Side-by-side
djangorest_alchemy/apibuilder.py
View file @
f0cbfe14
...
...
@@ -2,6 +2,7 @@
API Builder
Build dynamic API based on the provided SQLAlchemy model
"""
from
managers
import
AlchemyModelManager
from
viewsets
import
AlchemyModelViewSet
from
rest_framework_nested
import
routers
...
...
@@ -32,7 +33,7 @@ class APIModelBuilder(object):
manager
=
type
(
str
(
'{}Manager'
.
format
(
model
.
__name__
)),
self
.
base_managers
,
self
.
base_managers
+
(
AlchemyModelManager
,)
,
{
'model_class'
:
model
,
}
...
...
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