From: Joseph Spiros Date: Wed, 1 Feb 2012 15:08:43 +0000 (-0500) Subject: Merge branch 'release/0.9.2' X-Git-Tag: philo-0.9.2^0 X-Git-Url: http://git.ithinksw.org/philo.git/commitdiff_plain/8a772dd4761e3a4b926358d6ebf87c9fc7033ba5?hp=61b73fe068172f02d6c47e2b5387161919ec9618 Merge branch 'release/0.9.2' * release/0.9.2: 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. Added include_package_data option to setup.py to ensure MANIFEST.in is actually heeded. --- diff --git a/LICENSE b/LICENSE index 78171e9..97551fc 100644 --- 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/docs/conf.py b/docs/conf.py index 2e703d0..d41e6e0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -54,7 +54,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 diff --git a/docs/index.rst b/docs/index.rst index 05422dd..1c71285 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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 `. +Philo is a foundation for developing web content management systems. Please, read the :doc:`notes for our latest release `. Prerequisites: diff --git a/docs/releases/0.9.2.rst b/docs/releases/0.9.2.rst new file mode 100644 index 0000000..c1983ae --- /dev/null +++ b/docs/releases/0.9.2.rst @@ -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 diff --git a/philo/__init__.py b/philo/__init__.py index 4e4f145..3a055a1 100644 --- a/philo/__init__.py +++ b/philo/__init__.py @@ -1 +1 @@ -VERSION = (0, 9, 1) +VERSION = (0, 9, 2) diff --git a/philo/models/fields/entities.py b/philo/models/fields/entities.py index 0558d3e..167fd39 100644 --- a/philo/models/fields/entities.py +++ b/philo/models/fields/entities.py @@ -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): diff --git a/setup.py b/setup.py index 82ba104..8a91d14 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,5 @@ #!/usr/bin/env python - import os - from setuptools import setup, find_packages @@ -17,6 +15,7 @@ setup( maintainer = "iThink Software", maintainer_email = "contact@ithinksw.com", packages = find_packages(), + include_package_data=True, classifiers = [ 'Environment :: Web Environment', @@ -47,4 +46,4 @@ setup( dependency_links = [ 'https://github.com/django-mptt/django-mptt/tarball/master#egg=django-mptt-dev' ] -) \ No newline at end of file +)