Closed app-generator closed 1 year ago
Hello @Mortrest
I just added detailled requirements. Let me know if something is not clear.
Ty
Hello
In this project, the code should be generated based on the model types.
The drawback of the previous implementation is the runtime overload injected by the process. Being abstract, the app always scans the definition and applies the generic processing.
In this project, the serialization code should be specific to the model definition, like a hardcoded implementation tied to the models.
The abstract layer shouldn't be the solution.
So, the flow is this:
Let me know if something is missing.
Hello I implemented generating api (without authorization). but for authorization, you want to use django rest jwt?
Hello @Mortrest
Ty for your work. Regarding the authorization, can you tell me what options we have?
For the Dyn API project I wrote a simple checker that decorates the API views. https://github.com/app-generator/priv-devtool-django-dynamic-api/blob/master/apps/helpers.py
Before choosing a solution, is important to keep in mind the use cases:
Let me know all possible solutions. Ty!
Django Rest Framework has an option to have 2 authentication methods (token-base and basic-authentication) together. It seams to be best solution.
There is a point in your saying about mutating requests. You said: ordinary users can mutate their own items superusers can mutate all items If we want this, we should force users to add a creator field to each model (foreign key to User). I think this forcing is not good. Do you have another opinion?
Hello @Mortrest
We can skip this constraint for the moment (no creator field) and keep the mutating operations the same for all auth users (superusers and ordinary users).
Being the first iteration of the module, without real users feedback, is a good idea to keep things as simple as possible.
I'm ok to use the dual auth layer for DRF, but we need to document both cases in the README file.
Also, a sample for the basic auth should be coded in the main dashboard.
Ty @Mortrest
Hello Implementation Almost over. I added some description to README.md to describe how can work with app. Please take a look.
Ty @Mortrest I will validate soon the feature. 🚀🚀
P.S. @Mortrest please take a look at #4 ty
Hello @Mortrest
Development moved to: https://github.com/app-generator/django-soft-ui-dashboard
Validated & Closed.
REQ_01
- Models defined in apps/models.pyREQ_02
- User runs the commandpython manager gen_api
- Operation Checks:REQ_02_1
- model exists in the DBREQ_02_2
- model enabled in the CONFIGREQ_03
- The code is generated inapps/api
REQ_03_1
- Old code is removedREQ_03_2
- New definitions are addedREQ_04
- API Engine:REQ_04
- API Permissions:REQ_04_1
- Common users are able to edit / delete / list / their itemsREQ_04_2
- Superusers have full power over CRUD operationsREQ_04_3
- GET requests are free (item + get all)