fnp
/
django-migdal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
new fields: gallery, time/place for events
[django-migdal.git]
/
migdal
/
search_indexes.py
diff --git
a/migdal/search_indexes.py
b/migdal/search_indexes.py
index
fc35cff
..
91f7ab7
100644
(file)
--- a/
migdal/search_indexes.py
+++ b/
migdal/search_indexes.py
@@
-16,6
+16,12
@@
class EntryIndex(indexes.SearchIndex, indexes.Indexable):
date = indexes.DateTimeField(indexed=True, model_attr="date")
author = indexes.CharField(model_attr="author")
date = indexes.DateTimeField(indexed=True, model_attr="date")
author = indexes.CharField(model_attr="author")
+ def prepare_date(self, obj):
+ date = u''
+ if 'date' in self.prepared_data:
+ date = self.prepared_data['date'].strftime('%Y-%m-%dT%H:%M:%SZ')
+ return date
+
def get_model(self):
return Entry
def get_model(self):
return Entry