Merge branch 'develop' into gilbert-ext4 gilbert-ext4
authorJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 2 Feb 2012 07:04:52 +0000 (02:04 -0500)
committerJoseph Spiros <joseph.spiros@ithinksw.com>
Thu, 2 Feb 2012 07:04:52 +0000 (02:04 -0500)
* develop:
  Fixed a few bugs with the documentation, and links to the documentation from the README. Sphinx can now build the documentation reliably due to conf.py explicitly adding the docs directory to the path. Added a link to the Bitbucket mirror, extending the set currently consisting of GitHub and Gitorious.
  Bumped version number and wrote release notes for 0.9.2 in preparation for release.
  Fixed an exception with JSONAttributes using DateField or DateTimeField as their field template when the stored value is None. Fixes #178.
  Updated copyright date range to end in 2012 instead of 2011.

LICENSE
README
README.markdown
docs/conf.py
docs/contributing.rst
docs/index.rst
docs/releases/0.9.2.rst [new file with mode: 0644]
philo/__init__.py
philo/models/fields/entities.py

diff --git a/LICENSE b/LICENSE
index 78171e9..97551fc 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009-2011, iThink Software.
+Copyright (c) 2009-2012, iThink Software.
 
 Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
 
diff --git a/README b/README
index abf3a35..2bdca5f 100644 (file)
--- a/README
+++ b/README
@@ -17,4 +17,4 @@ After installing philo and mptt on your PYTHONPATH, make sure to complete the fo
 4. Optionally add a root node to your current Site.
 5. (philo.contrib.gilbert) Add 'django.core.context_processors.request' to settings.TEMPLATE_CONTEXT_PROCESSORS.
 
-Philo should be ready to go! All that's left is to learn more <http://docs.philocms.org/> and contribute <http://docs.philocms.org/en/latest/contribute.html>.
+Philo should be ready to go! All that's left is to learn more <http://docs.philocms.org/> and contribute <http://docs.philocms.org/en/latest/contributing.html>.
index 30856dc..6cb84d1 100644 (file)
@@ -18,4 +18,4 @@ After installing philo and mptt on your PYTHONPATH, make sure to complete the fo
 4. Optionally add a root node to your current Site.
 5. (philo.contrib.gilbert) Add 'django.core.context_processors.request' to settings.TEMPLATE_CONTEXT_PROCESSORS.
 
-Philo should be ready to go! All that's left is to [learn more](http://docs.philocms.org/) and [contribute](http://docs.philocms.org/en/latest/contribute.html).
+Philo should be ready to go! All that's left is to [learn more](http://docs.philocms.org/) and [contribute](http://docs.philocms.org/en/latest/contributing.html).
index 2e703d0..b1329ba 100644 (file)
@@ -16,6 +16,7 @@ import sys, os
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
+sys.path.append(os.path.abspath(os.path.dirname(__file__)))
 sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "_ext")))
 sys.path.append(os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
 
@@ -54,7 +55,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'Philo'
-copyright = u'2009-2011, iThink Software'
+copyright = u'2009-2012, iThink Software'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
index 4c9fb7d..85fc311 100644 (file)
@@ -4,7 +4,7 @@ Contributing to Philo
 So you want to contribute to Philo? That's great! Here's some ways you can get started:
 
 * **Report bugs and request features** using the issue tracker at the `project site <http://project.philocms.org/>`_.
-* **Contribute code** using `git <http://git-scm.com/>`_. You can fork philo's repository either on `GitHub <http://github.com/ithinksw/philo/>`_ or `Gitorious <http://gitorious.org/ithinksw/philo/>`_. If you are contributing to Philo, you will need to submit a :ref:`Contributor License Agreement <cla>`.
+* **Contribute code** using `git <http://git-scm.com/>`_. You can fork philo's repository on `GitHub <http://github.com/ithinksw/philo/>`_, `Gitorious <http://gitorious.org/ithinksw/philo/>`_, or `Bitbucket <http://bitbucket.org/ithinksw/philo/>`_. If you are contributing to Philo, you will need to submit a :ref:`Contributor License Agreement <cla>`.
 * **Join the discussion** on IRC at `irc://irc.oftc.net/#philo <irc://irc.oftc.net/#philo>`_ if you have any questions or suggestions or just want to chat about the project. You can also keep in touch using the project mailing lists: `philo@ithinksw.org <mailto:philo@ithinksw.org>`_ and `philo-devel@ithinksw.org <mailto:philo-devel@ithinksw.org>`_.
 
 
index 05422dd..1c71285 100644 (file)
@@ -8,7 +8,7 @@
 Welcome to Philo's documentation!
 =================================
 
-Philo is a foundation for developing web content management systems. Please, read the :doc:`notes for our latest release <releases/0.9.1>`.
+Philo is a foundation for developing web content management systems. Please, read the :doc:`notes for our latest release <releases/0.9.2>`.
 
 Prerequisites:
 
diff --git a/docs/releases/0.9.2.rst b/docs/releases/0.9.2.rst
new file mode 100644 (file)
index 0000000..c1983ae
--- /dev/null
@@ -0,0 +1,4 @@
+Philo version 0.9.2 release notes
+=================================
+
+The primary focus of the 0.9.2 release was repairing the setuptools configuration so that Philo can be installed and updated reliably. In addition, a bug involving the use of :class:`DateTimeField` or :class:`DateField` as the field template for a :class:`JSONAttribute` has been fixed.
\ No newline at end of file
index 4e4f145..3a055a1 100644 (file)
@@ -1 +1 @@
-VERSION = (0, 9, 1)
+VERSION = (0, 9, 2)
index 0558d3e..167fd39 100644 (file)
@@ -2,7 +2,7 @@ import datetime
 from itertools import tee
 
 from django import forms
-from django.core.exceptions import FieldError
+from django.core.exceptions import FieldError, ValidationError
 from django.db import models
 from django.db.models.fields import NOT_PROVIDED
 from django.utils.text import capfirst
@@ -193,7 +193,10 @@ class JSONAttribute(AttributeProxyField):
                """If the field template is a :class:`DateField` or a :class:`DateTimeField`, this will convert the default return value to a datetime instance."""
                value = super(JSONAttribute, self).value_from_object(obj)
                if isinstance(self.field_template, (models.DateField, models.DateTimeField)):
-                       value = self.field_template.to_python(value)
+                       try:
+                               value = self.field_template.to_python(value)
+                       except ValidationError:
+                               value = None
                return value
        
        def get_storage_value(self, value):