Skip to content

Tag: django

Django – How to save model objects in another model?

Let’s say I have these two models (in models.py file): How can I merge these two models in a new model but with the same Id? So it becomes: PS: In my views.py file I called a save method like that: Thanks in advance and I really appreciate who answers that because I see that many people having the same

Django Rest API from Database

I have 2 APIs from my existing project. Where One provides the latest blog posts and another one provides sorting details. The 2nd API (sorting) gives blog posts ID and an ordering number, which should be in the 1st,2nd,3rd…n position. If I filter in the first API with that given ID I can get the blog p…