Drafts, reviews and in-future posts with Django-dress-blog

Saturday, September 29, 2012

Show unpublished content Allow authors/reviewers see content in draft mode, review mode, or waiting to hit the publication date. The draft mode and in-future posts are must-have features in any blog application. And when the blog is the result of a team the review mode comes very handy too.

Since recent changes Django-dress-blog supports the review mode too, so that an author can set a story in review to get feedback from other authors before releasing the content to the public.

Along with the review mode authors can also preview unpublished content in the blog, a new menu item allows switching on and off the visualization of unpublished content.

This features are already available in the live demo. Here I introduce them in short and refer to the demo to see them in action.

Writing drafts

Draft background A draft preview The simplest writing flow that works for single authored blogs consist of:

  1. Writing the draft and previewing it until it looks wonderful.
  2. Then set the publication time, make the status "Public", and submit.

To start writing the draft you don't do anything special, just click on "Add" or "Add story", in the administrative interface of your blog. Posts are created with status: draft by default.

Something worth noting when the blog is maintained by multiple authors is that the draft author is the only one authorized to access the post.

Previewing posts

To preview the post, save it and visit the blog.

At the top right side you will see a dropdown menu with the option Show unpublished. Click on it and the story will show up with a specific background that indicates the post is a draft and thus not visible to the public. It's that simple.

Reviewing posts

The writing flow in a blog maintained by multiple authors often has an extra step, the review.

Having a couple of extra eyes looking at your posts before sending them to publication is a good habit. Not only help fix syntax mistakes, it also helps maintain a communication policy.

Django-dress-blog helps startup teams and small organizations keep a writing flow using reviews. You can choose who will play the review role:

  1. Only the PR.
  2. Everybody in your team.
  3. A selected group of users.

In the first and second case you can assign the special permission dress blog | post | can review posts either to all your users or just the PR user.

Change post status Change a post status: edit the post in the admin site, go to the "Post data" block and select "Review" from the "Status" drop down list. In the second case you create a Django group called "reviewers" with the special permission and associate each of your reviewers to that group.

As a reviewer a user may have read and write access to reviews. Only the author and the reviewers see reviews in the blog when clicking on Show unpublished content. And only them have write access to posts in review status in the administrative site.

To set a story in review status, edit the post in the admin site, go to the block in the bottom named Post data and select Review from the Status drop down list.

A live demo

The editor block Authors and reviewers see their drafts and reviews listed in the editor side block. Let's see all this in action. Do login in the administrative site of the live demo with user "admin" and password "admin", and visit the demo blog.

There is no visible draft yet. Click on Show unpublished and see that a couple of stories show up with the draft word repeated in the background.

There are posts with a review word in the background too, that belong to Alice and Bob. You see that unpublished content because the "admin" user joined the "reviewers" group.

If you now look at the list of stories in the demo admin site and click on the second one, authored by Alice, you will have a forbidden access response. That's because it's a draft, you are logged in as admin and the story belongs to Alice.

Try login in with the user "alice" and password "admin". Now you got access to the draft, and you can see it in the front page, along with Bob's reviews. Because Alice is a reviewer too.

However Bob is not a reviewer. So if you do login with "bob", password "admin", you won't see other users' reviews but Bob's, along with his drafts.

Publishing in-future

Finally, Django-dress-blog allow authors publish content in the future. When the post hits the publication time it shows up in the site as if it was just published. It's a simple feature that helps release content at a given pace.

As it happens with drafts and reviews, posts sent to publish in-future are considered unpublished content and thus visible when the user click on Show unpublished content, in the navigation bar. But unlike drafts and reviews, in-future posts are readable by all the blog staff.

To publish a post in-future simply set its Status to Public, and choose the Pub date in the future time that better suites you.

Your comment

Required for comment verification