Permalink
Browse files

Merge branch 'release/0.3.1'

  • Loading branch information...
2 parents 3a6fdb8 + d5194d7 commit 1a4055b1c79df4de4353583a232f6ffc406ee32f @piquadrat committed May 16, 2011
View
@@ -1 +1 @@
-__version__ = '0.3'
+__version__ = '0.3.1'
@@ -28,7 +28,7 @@ def _get_field_copy(cls, field, language):
if model_attr:
model_attr += '_%s' % language.replace('-', '_')
arg_names = inspect.getargspec(indexes.SearchField.__init__)[0][2:]
- kwargs = dict((arg_name, getattr(field, arg_name)) for arg_name in arg_names)
+ kwargs = dict((arg_name, getattr(field, arg_name)) for arg_name in arg_names if hasattr(field, arg_name))
kwargs['model_attr'] = model_attr
copy = field.__class__(**kwargs)
copy.null = True
@@ -52,7 +52,8 @@ def get_value(self, context, obj, field_name):
return self.EMPTY_VALUE
def get_translated_value(self, obj, field_name, language):
- value = getattr(obj, '%s_%s' % (field_name, language), '')
+ safe_lang = language.replace('-', '_')
+ value = getattr(obj, '%s_%s' % (field_name, safe_lang), '')
if self._is_truthy(value):
return value
else:
@@ -33,7 +33,7 @@ class _PageIndex(_get_index_base()):
language = language_code
text = indexes.CharField(document=True, use_template=False)
- pub_date = indexes.DateTimeField(model_attr='publication_date')
+ pub_date = indexes.DateTimeField(model_attr='publication_date', null=True)
login_required = indexes.BooleanField(model_attr='login_required')
url = indexes.CharField(stored=True, indexed=False, model_attr='get_absolute_url')
title = indexes.CharField(stored=True, indexed=False, model_attr='get_title')
View
@@ -46,7 +46,7 @@
# built documents.
#
# The short X.Y version.
-version = '0.1'
+version = '0.3.1'
# The full version, including alpha/beta/rc tags.
release = '0.1'

0 comments on commit 1a4055b

Please sign in to comment.