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
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
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
3 matches
Mail list logo