跳转到主要内容

用于调试django-readers查询集函数的格式化打印器

项目描述

django-readers-debug

状态:实验性

用于调试django-readers查询集函数的格式化打印器。

安装

从PyPI安装

pip install django-readers-debug

用法

没有django-readers-debug

>>> from django_readers import qs
>>> prepare = qs.pipe(
... qs.include_fields("name"),
... qs.auto_prefetch_relationship("author", qs.include_fields("name")),
... qs.filter(publication_year__gte=2021),
... )
>>> print(prepare)
<function pipe.<locals>.piped at 0x10ce2a670>
>>>

django-readers-debug

>>> from django_readers_debug import debug_print
>>> debug_print(prepare)
qs.pipe(
    qs.include_fields("name"),
    qs.auto_prefetch_relationship(
        "author", prepare_related_queryset=qs.include_fields("name")
    ),
    qs.filter(publication_year__gte=2021),
)

已知限制

仅尽可能打印Q对象和Prefetch对象。

行为准则

有关贡献此存储库时的行为准则指南,请参阅https://www.dabapps.com/open-source/code-of-conduct/

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

django-readers-debug-0.0.4.tar.gz (3.6 kB 查看哈希值)

上传时间:

构建分布

django_readers_debug-0.0.4-py3-none-any.whl (4.1 kB 查看哈希值)

上传时间: Python 3

由以下支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面