django utils是一个模块,其中包含一些标准django安装中未包含的方便实用程序
django-utils2的Python项目详细描述
特拉维斯状态:
覆盖范围:
django utils是一个小型django助手函数、实用程序和 使公共模式更短更容易的类。这决不是 完整的收藏,但它在过去对我很有用,我会 继续延伸。
例如:
- Enum based choicefields
- Models with automatic __str__, __unicode__ and __repr__ functions based on names and/or slugs using simple mixins.
- Models with automatic updated_at and created_at fields
- Models with automatic slugs based on the name property.
- Iterating through querysets in predefined chunks to prevent out of memory errors
库依赖于python utils库。
文档位于:http://django-utils-2.readthedocs.io/en/latest/
安装
要安装:
- Run pip install django-utils2 or execute python setup.py install in the source directory
- Add django_utils to your INSTALLED_APPS
如果要运行测试,请运行py.test(tests/requirements.txt中的需求)