django-rest-polymorphic:Django REST Framework的多态序列化器

时间:2021-05-22 17:56:19
【文件属性】:
文件名称:django-rest-polymorphic:Django REST Framework的多态序列化器
文件大小:22KB
文件格式:ZIP
更新时间:2021-05-22 17:56:19
Python Django REST多态 Django REST Framework的多态序列化程序。 概述 django-rest-polymorphic允许您轻松定义使用django-polymorphic库创建的继承模型的序列化器。 安装 使用pip安装: $ pip install django-rest-polymorphic 用法 定义多态模型: # models.py from django . db import models from polymorphic . models import PolymorphicModel class Project ( PolymorphicModel ): topic = models . CharField ( max_length = 30 ) class ArtProject ( Project ): artist =
【文件预览】:
django-rest-polymorphic-master
----MANIFEST.in(159B)
----requirements()
--------packaging.txt(47B)
--------testing.txt(72B)
--------codestyle.txt(14B)
----README.rst(5KB)
----codecov.yml(223B)
----manage.py(329B)
----HISTORY.rst(758B)
----requirements.txt(93B)
----AUTHORS.rst(232B)
----.travis.yml(2KB)
----tox.ini(971B)
----example()
--------manage.py(627B)
--------example()
--------projects()
----pytest.ini(47B)
----LICENSE(1KB)
----setup.py(2KB)
----.editorconfig(331B)
----tests()
--------settings.py(704B)
--------__init__.py(0B)
--------test_serializers.py(5KB)
--------models.py(502B)
--------serializers.py(968B)
----.gitignore(436B)
----rest_polymorphic()
--------__init__.py(1B)
--------__version__.py(301B)
--------serializers.py(5KB)

网友评论