-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Admin view + custom relationships #161
base: master
Are you sure you want to change the base?
Conversation
…re/drest-admin-view
working CSV upload support
…/dynamic-rest into lt/drest-admin-view
…/dynamic-rest into lt/drest-admin-view
…/dynamic-rest into lt/drest-admin-view
@ryochiji @aleontiev We want to perform frontend regression testing on the feature deploy for the admin product, so I rebased vishnu-backend from master to take into account the new |
when we can try the 2.0 version? did you add drf 3.7 compat for 2.0 release? |
sorry for bugging! can anyone give any idea about this work? will this ever be merged? what helps needed to complete this? |
@aleontiev do you have plan to complete this? or it would be ok to take over? |
@aleontiev I would love to help in maintaining this package :) you could add me as a co maintainer :) |
Large set of changes to support advanced admin functionality in the admin renderer.
API layer:
Admin renderer:
DynamicRelationField
support, usingselect2
with query on natural keyInternals:
serializer_class
optional onDynamicRelationField
. If not passed, DREST will infer the serializer usingDynamicRouter
s registry (map of model -> canonical serializer for that model)getter/setter
support onDynamicRelationField
. If specified, DREST will call the given methods to get and set relationship values instead of using the model source. This is useful for e.g. higher level APIs that want to hide complicated internal modeling. UnlikeDynamicMethodField
, aDynamicRelationField
with agetter
will be automatically properly serialized and will supportinclude[]
andexclude[]
DynamicRelationField
setter for many-relationsget_url
method to serializers, which will resolve the serializer's endpoint based on the first registered viewset. Works even if the serializer is not canonical, but will fall back to usingDynamicRouter
's map of canonical serializers