MongoDB with Django and React

Hello everybody,
I’m in desperate need of help as I’m totally stuck with whats the best approach for my problem and how to solve that in Django.
I’m having a backend in Python with a MongoDB and want to work with Django for User-Management and the API Framework, the site itself is made with React.
My problem is that my MongoDB already has it’s structure and Django wants to store everything in table form. So I think I’m not able to use serializers for the API as they’re using their own structure. But I can’t get POST requests and so on to work without serializers.
So I’m not sure if it’s possible to work with Django and MongoDB as Django already has it’s own ORM with seems to structure the data automatically.
And I query or send data via pymongo where I have a lot of nestes Json dicts.

I hope this explanation helps to get an overview of my problem. I’m more that happy to answer all questions regarding how I setuped everything.

There’s a package called “Djongo” that provides some degree of integration between Django and MongoDB. Their home page does indicate that they have some integration with the DRF. It might be worth a look.


Thank you Ken, yes I’ve seen Djongo and MongoEngine so far but both seem to have the same problem when storing data in nested dicts, right?

I’m sorry; no, I have no idea what “problem” you’re referring to.