Django: publishing and unpublishing posts
I have a basic Django blogging application with the fields such as textfield, datetime, imagefield, slug etc. I want to have a feature whe开发者_如何学Gore I can publish and unpublish posts in the admin interface(with the help of checkbox). How can this be done?
Add a BooleanField
that describes whether or not the post is published, and check the value of this field in your views.
精彩评论