Django Choices功能的健全性。
django-choices的Python项目详细描述
=====
django选择
===============
-----------------------------
——
——
——
——
——
——
——您可以通过pypi进行安装,也可以直接从github回购进行安装。
代码块::bash
$pip install django选项
代码块::bash
$easy_install django choices
----
基本用法
----
开始创建选项类然后将
字段上的choices属性指向新类的“choices”属性Django将能够使用
选项,并且您将能够按名称访问这些值例如,您可以替换这个:
。代码块::python
,
)
Fields
name=models.CharField(max_length=32)
type=models.CharField(max_length=1,choices=PERSON_type)
代码块::python
#字段
name=models.charfield(max_length=32)
type=models.charfield(max_length=1,choices=persontype.choices)
代码块::python
代码块::python
类示例(DjangoChoices):
选项a=ChoiceItem()
选项b=ChoiceItem()
打印(示例。选项a)“选项a”
-
许可证
-
根据“MIT许可证”授权。
-
源代码
-
-
在Github上。|特拉维斯图片:https://secure.travis-ci.org/bigjason/django-choices.svg?branch=master
:目标:http://travis ci.org/bigjason/django choices
。|覆盖范围图像::https://coveralls.io/repos/bigjason/django-choices/badge.svg?branch=master&service=github
:目标:https://coveralls.io/github/bigjason/django-choices?分支=主
…|文档图片:https://readthedocs.org/projects/django-choices/badge/?version=latest
:target:http://django choices.readthedocs.io/en/latest/
:alt:Documentation Status
| pypi图像::https://img.shields.io/pypi/v/django choices.svg
:目标:https://pypi.python.org/pypi/django choices
| python版本image::https://img.shields.io/pypi/pyversions/django choices.svg
…| django版本图像::https://img.shields.io/pypi/django-versions/django-choices.svg
…_选择:http://docs.djangoproject.com/en/stable/ref/models/fields/choices
。_麻省理工学院许可证:http://en.wikipedia.org/wiki/mit_license
。_ django:http://www.djangoproject.com/
。_github:https://github.com/bigjason/django choices
_ pypi:http://pypi.python.org/pypi/django choices/
。_文档:http://django choices.readthedocs.io/en/latest/
django选择
===============
-----------------------------
——
——
——
——
——
——
——您可以通过pypi进行安装,也可以直接从github回购进行安装。
代码块::bash
$pip install django选项
代码块::bash
$easy_install django choices
----
基本用法
----
开始创建选项类然后将
字段上的choices属性指向新类的“choices”属性Django将能够使用
选项,并且您将能够按名称访问这些值例如,您可以替换这个:
。代码块::python
,
)
Fields
name=models.CharField(max_length=32)
type=models.CharField(max_length=1,choices=PERSON_type)
代码块::python
#字段
name=models.charfield(max_length=32)
type=models.charfield(max_length=1,choices=persontype.choices)
代码块::python
代码块::python
类示例(DjangoChoices):
选项a=ChoiceItem()
选项b=ChoiceItem()
打印(示例。选项a)“选项a”
-
许可证
-
根据“MIT许可证”授权。
-
源代码
-
-
在Github上。|特拉维斯图片:https://secure.travis-ci.org/bigjason/django-choices.svg?branch=master
:目标:http://travis ci.org/bigjason/django choices
。|覆盖范围图像::https://coveralls.io/repos/bigjason/django-choices/badge.svg?branch=master&service=github
:目标:https://coveralls.io/github/bigjason/django-choices?分支=主
…|文档图片:https://readthedocs.org/projects/django-choices/badge/?version=latest
:target:http://django choices.readthedocs.io/en/latest/
:alt:Documentation Status
| pypi图像::https://img.shields.io/pypi/v/django choices.svg
:目标:https://pypi.python.org/pypi/django choices
| python版本image::https://img.shields.io/pypi/pyversions/django choices.svg
…| django版本图像::https://img.shields.io/pypi/django-versions/django-choices.svg
…_选择:http://docs.djangoproject.com/en/stable/ref/models/fields/choices
。_麻省理工学院许可证:http://en.wikipedia.org/wiki/mit_license
。_ django:http://www.djangoproject.com/
。_github:https://github.com/bigjason/django choices
_ pypi:http://pypi.python.org/pypi/django choices/
。_文档:http://django choices.readthedocs.io/en/latest/