Closed kevpio closed 45 minutes ago
You might be in the wrong place on github. Django Rest Framework has everything you need. The docs are excellent and the LLMs are also pretty good at it.
@kevpio Hello :wave:
Sorry for replying late.
If you give me some more context, I'd be able to help you better.
Generally speaking, if you want to expose an API from Django, you can use either DRF or django-ninja (the popular choices)
This styleguide mentions how to approach that when you have an API (which is basically the same with views)
As for example, we have plenty of code here - https://github.com/HackSoftware/Django-Styleguide-Example
Cheers!
Also, feel free to reopen, if needed
Hi,
I'm new to Django but not new to creating APIs and microservices using other frameworks like flask and graphql. I'm trying to create my own project to both learn Django and because I want to create an app for something.
I've gone through the drf tutorials but wasn't happy about where I was supposed to put business logic when using the generics and after some searching found this style guide. It all seems ok with a quick read through but when I try and actually put it into practice I can't seem to find in this guide a clear pattern for how to do a crud API. You flit from a User to File to Course (course is not represented in your the actual code here). All I want is to see how you would structure the full CRUD api for something including the model including Create, READ, Update and Delete.
Sorry if my tone seems a little off, but I'm just frustrated, the ideas you have seem good and I want to adopt them but this guide is not helping me to put it into practice.