Data Partitioning

8 views
Skip to first unread message

Manoj Kumar P

unread,
Mar 21, 2018, 7:35:18 AM3/21/18
to Django REST framework
Hi,

Firstly, The context.

My company wants to use layers of classes called API's and google protobuf as the data exchange format. An API is tied to a protobuf message

Reason is, thinking ahead. model changes might impact code base.


But i feel confused. I believe that model changes can be encapsulated using the model managers alone.

Which brings me to building a prototype for the Data Partitioning scenario.

What is the best way to implement data partitioning in DRF?


I am currently overriding the create method in the manager to use an argument and select a different Model.

How do i implement - override the filter method of the manager. It seems to be coming from django.query.QuerySet

Is there a simpler way to do this?


P.S.

I am using the polymorphic python django package in some faith that it offers chaining multiple models out of the box.


Thank You
Manoj
Reply all
Reply to author
Forward
0 new messages