django-composite-foreignkey:允许创建不与其他模型的pk链接但具有多列匹配本地模型列或固定值的django外键

时间:2021-05-01 02:00:37
【文件属性】:
文件名称:django-composite-foreignkey:允许创建不与其他模型的pk链接但具有多列匹配本地模型列或固定值的django外键
文件大小:47KB
文件格式:ZIP
更新时间:2021-05-01 02:00:37
Python django-composite-foreignkey 允许创建不与其他模型的pk链接但具有与本地模型列或固定值匹配的多列的django外键。 一些数据库具有复合主键,导致无法使用Django外键。 今天,Django不支持Composite Primary Key,ForeignKey不支持多列。 但幸运的是,ForeignKey的基类很好地支持它,因此此lib只是在ForeignObject周围添加了一些包装,以使其更有用。 此实现的真正补充是支持使用Raw值定制链接。 CompositeForeignKey的此实现通过强制提供其他模型的对应列(而不是强制提供PrimaryKey)来跳过Composite Primary Key的复杂性。 安装 使用pip安装: pip install django-composite-foreignkey 或者,您可以安装下载或克隆此仓库
【文件预览】:
django-composite-foreignkey-master
----setup.py(2KB)
----.gitignore(770B)
----requirements.txt(28B)
----.travis.yml(1KB)
----MANIFEST.in(60B)
----LICENSE(34KB)
----setup.cfg(248B)
----compositefk()
--------compat.py(685B)
--------related_descriptors.py(2KB)
--------__init__.py(70B)
--------fields.py(13KB)
----testsettings.py(1KB)
----broken_test_app()
--------__init__.py(204B)
--------models.py(2KB)
----README.rst(4KB)
----testapp()
--------__init__.py(204B)
--------models.py(5KB)
--------management()
--------fixtures()
--------tests.py(16KB)
----CONTRIBUTING.rst(3KB)
----manage.py(246B)
----docs()
--------Makefile(7KB)
--------index.rst(223B)
--------conf.py(8KB)
--------installation.rst(312B)
--------make.bat(6KB)
--------quickstart.rst(10KB)
--------issues.rst(2KB)
--------readme.rst(52B)
--------contributing.rst(32B)
----tox.ini(892B)

网友评论