E
E
Egor2018-09-16 11:03:43
Django
Egor, 2018-09-16 11:03:43

How to get the entire model in Django, fields of type ManytoMany would contain related data?

For example, this is how I get all user models: Users.objects.all(), the fields contain the id of the objects, and I need the objects themselves. Then I need to put it in json.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2018-09-16
@kentuck1213

https://docs.djangoproject.com/en/2.1/topics/seria...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question