Re: How models.Manager is working behind the scene and calling different serialize methods?

2020-05-29 Thread django-newbie
Ohk, I got it now.. Thanks for clarifying this. My further doubts in continuation of this are. 1. For confirmation, ModelName.objects.all() calls get_queryset() method, while ModelName.objects.get calls get() method internally. 2. In above code to override default serialize method of

Re: How models.Manager is working behind the scene and calling different serialize methods?

2020-05-29 Thread Sencer Hamarat
I believe, the method "get_query*set*" name is explains what you want to know. If you filter or fetch every thing with django query, it returns queryset. The .get() query on the other hand, returns a single object. Saygılarımla, Sencer HAMARAT On Fri, May 29, 2020 at 4:43 AM django-newbie

How models.Manager is working behind the scene and calling different serialize methods?

2020-05-28 Thread django-newbie
Hi, I am new to django and going through a tutorial and now confused with one particular implementation. models.py import json from django.core.serializers import serialize from django.db import models from django.conf import settings # Create your models here. def