django的一组可重用基类和帮助程序
django-pubtools的Python项目详细描述
django pubtools是用于创建可发布django模型的帮助程序库。
[![循环CI](https://circle ci.com/gh/gregplaysguitar/django-pubtools.svg?style=svg)(https://circleci.com/gh/gregplaysguitar/django pubtools)
[![codecov](https://codecov.io/gh/gregplaysguitar/django pubtools/branch/master/graph/badge.svg)(https://codecov.io/gh/gregplaysguitar/django pubtools)
[![最新版本](https://img.shields.io/pypi/v/django-pubtools.svg?style=flat)(https://pypi.python.org/pypi/django pubtools/)
\overview
或发布状态。
-草稿内容可以由登录的工作人员在网站上预览
-预览内容可以公开预览,通过一个特殊的url
=models.charfield(最大长度=100)
```
views.py:
```python
from django.http import httpresponse
from.models import article
def article(请求,(BR/>)通过请求,使员工预览
文章=对象。发布(请求)< BR/>文章=获取(HttpResponse)。文章[BR/> @ BR/> >注册(文章)< BR/>模型导入在创建时设置)
-`上次更新`(日期时间,保存时更新)
-`发布日期`(日期)
-`发布状态`(草稿、审阅或发布之一)
-`发布`(属性)如果实例已发布,则返回true
-`获取上一个发布(qs=none,loop=false)`get previous publipublibu(qs=none,loop=false)`get next publibu(qs=none,loop=false)`get next publipublipublibuinstance
pubtools.models.publishablemodelModelQueryset`
得到,然后检查用户是否是工作人员,如果是,则返回具有请求状态的对象。否则,只返回
已发布的对象。
[![循环CI](https://circle ci.com/gh/gregplaysguitar/django-pubtools.svg?style=svg)(https://circleci.com/gh/gregplaysguitar/django pubtools)
[![codecov](https://codecov.io/gh/gregplaysguitar/django pubtools/branch/master/graph/badge.svg)(https://codecov.io/gh/gregplaysguitar/django pubtools)
[![最新版本](https://img.shields.io/pypi/v/django-pubtools.svg?style=flat)(https://pypi.python.org/pypi/django pubtools/)
\overview
或发布状态。
-草稿内容可以由登录的工作人员在网站上预览
-预览内容可以公开预览,通过一个特殊的url
=models.charfield(最大长度=100)
```
views.py:
```python
from django.http import httpresponse
from.models import article
def article(请求,(BR/>)通过请求,使员工预览
文章=对象。发布(请求)< BR/>文章=获取(HttpResponse)。文章[BR/> @ BR/> >注册(文章)< BR/>模型导入在创建时设置)
-`上次更新`(日期时间,保存时更新)
-`发布日期`(日期)
-`发布状态`(草稿、审阅或发布之一)
-`发布`(属性)如果实例已发布,则返回true
-`获取上一个发布(qs=none,loop=false)`get previous publipublibu(qs=none,loop=false)`get next publibu(qs=none,loop=false)`get next publipublipublibuinstance
pubtools.models.publishablemodelModelQueryset`
得到,然后检查用户是否是工作人员,如果是,则返回具有请求状态的对象。否则,只返回
已发布的对象。