Josh VanderLinden avatar Josh VanderLinden committed 2ec9891

Updated README for article statuses. Added some more tests. Version bump.

Comments (0)

Files changed (4)

 * Ability to post in the future
 * Article expiration facilities
 * Articles from email
+* Article statuses--"draft" and "finished" are there by default
 * Allows articles to be written in plain text/HTML or using Markdown,
   ReStructured Text, or Textile markup
 * Related articles
 * Follow-up articles
-* Disqus comments
+* Comments by Disqus
 * Article archive, with pagination
 * Internationalization-ready
 * Detects links in articles and creates a per-article index for you
         'acknowledge': True,
     }
 
+Article Statuses
+================
+
+As of ``1.9.6``, you may specify the state of an article when you save it.
+This allows you to begin composing an article, save it, and come back later to
+finish it.  In the past, this behavior was handled by not setting a publish
+date for the article.  However, saving an unfinished article with a non-live
+status allows superusers to view the article on the site as though it were
+live.  In the future, I plan to allow authors to view non-live versions of
+their articles.
+
+The default status for an article will always be the Article Status object with
+the lowest ``ordering`` value.  This includes negative integers.  If you want
+all articles to be ``Finished`` by default, go ahead and update the
+``ordering`` on that object to be less than the ``ordering`` value for the
+``Draft`` object (and/or any others you create).
+
 Good luck!  Please contact me with any questions or concerns you have with the
 project!
 

articles/__init__.py

-__version__ = '1.9.4-pre1'
+__version__ = '1.9.6-pre1'
 
 """
 The Pygments reStructuredText directive

articles/fixtures/initial_data.json

         "model": "articles.articlestatus", 
         "fields": {
             "name": "Finished",
-            "ordering": 0,
+            "ordering": 1,
             "is_live": 1
         }
     }

articles/tests.py

 
         self.assertEquals(len(Article.objects.active()), 1)
 
+    def test_default_status(self):
+        """Default status selection"""
+
+        default_status = ArticleStatus.objects.default()
+        other_status = ArticleStatus.objects.exclude(id=default_status.id)[0]
+
+        self.assertTrue(default_status.ordering < other_status.ordering)
+
     def test_tagged_article_status(self):
         """Tagged article status"""
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.