app-generator / sample-django-tastypie

Django Tastypie Sample - Open-Source Playground | AppSeed
https://appseed.us/boilerplate-code/
2 stars 0 forks source link

API managed Models - Filtered via CFG #5

Open app-generator opened 1 year ago

app-generator commented 1 year ago

Hello @koladev32

The ideal use-case regarding the models managed by the API is to have a configuration that limits the exposure.

This is the filter:

API_MODELS = [] #default, optional presence in CFG  
# OR 
API_MODELS = ['products'] # manage only products Model 
# OR
API_MODELS = ['ALL'] # manage ALL models

This behavior provides total control for the developer and follows the pattern provided already in this DRF library:

https://github.com/app-generator/django-api-generator

Let's debate and find a solution together.

Ty!