我想用django
创建admin后端模块/博客/ admin.py
from django.contrib import admin
from .models import Post
# Register your models here.
admin.site.register(Post)
我点击SAVE
时添加新的博文内容除外AttributeError at /admin/blog/post/add/
'Post' object has no attribute 'publish'
Request Method: POST
Request URL: http://ilkblog.dev:8000/admin/blog/post/add/
Django Version: 1.11.7
Exception Type: AttributeError
Exception Value:
'Post' object has no attribute 'publish'
Exception Location: /data/lib/python3.6/site-packages/django/db/models/base.py in _perform_date_checks, line 1146
Python Executable: /data/bin/python
Python Version: 3.6.3
Python Path:
['/app/app',
'/data/lib/python36.zip',
'/data/lib/python3.6',
'/data/lib/python3.6/lib-dynload',
'/data/lib/python3.6/site-packages']
Server time: Fri, 1 Dec 2017 22:36:08 +0000