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/




欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java我的int值在SharedReferences中不被记住   java如何编辑Spring可分页对象?   java如何在gradle中单独调用任务   jvm以编程方式设置最大java堆大小   java如果满足多个条件,如何使用If语句计算数字?   如何在java中从json文件中获取特定值   如何在Sphinx4中为Java语音识别添加自定义语法?   java int[]copy=data;//当数据是数组时会发生什么?   java豪猪管理器。停下来。destroy()不起作用   安卓在API级别28中找不到画布变量   基于SOLID的java冗余   用于talend作业的java Liferay和portlet   从java到安卓的视频流   java获取在控件的类定义中添加自定义控件的场景大小   awt Java IndexOutOfBoundsException   java如何使用Spring JmsTemplate更改MQ头   java遍历数组并打印每个对象   java Google Map api v2标记在我旋转手机和地图“刷新”之前不会移动