Skip to main content

Django queryset and serialization together

Project description


Django QSerializer started as an internal Buser project to improve our serialization process.

Database queries and serialization are two separated step, but really ORM coupled. Relationships must be fetched from database before serialization, but Django don't have an easy way to define that.

from django.db import models
from django_qserializer import SerializableManager

class Company(models.Model):
    name = models.CharField(max_length=64)

class Bus(models.Model):
    company = models.ForeignKey(Company, on_delete=models.SET_NULL)
    objects = SerializableManager()

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-qserializer, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size django_qserializer-0.1.tar.gz (5.1 kB) File type Source Python version None Upload date Hashes View
Filename, size django_qserializer-0.1-py3-none-any.whl (6.7 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page