Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

The ``dateutil`` requirement is now optional. Thanks to arthurnn for …

…the report.
  • Loading branch information...
commit 1f8c2322f9cf2c9e5f3e91e4524c2374ac11d99d 1 parent c2e3ecc
@toastdriven toastdriven authored
View
7 docs/management_commands.rst
@@ -37,6 +37,13 @@ wish to delete the entire index.
``update_index``
================
+.. note::
+
+ If you use the ``--start/--end`` flags on this command, you'll need to
+ install dateutil_ to handle the datetime parsing.
+
+ .. _dateutil: http://pypi.python.org/pypi/python-dateutil/1.5
+
The ``update_index`` command will freshen all of the content in your index. It
iterates through all indexed models and updates the records in the index. In
addition to the standard management command options, it accepts the following
View
5 haystack/management/commands/update_index.py
@@ -1,5 +1,4 @@
import datetime
-from dateutil.parser import parse as dateutil_parse
import os
import warnings
from optparse import make_option
@@ -171,12 +170,16 @@ def handle(self, *items, **options):
self.start_date = datetime.datetime.now() - datetime.timedelta(hours=int(age))
if start_date is not None:
+ from dateutil.parser import parse as dateutil_parse
+
try:
self.start_date = dateutil_parse(start_date)
except ValueError:
pass
if end_date is not None:
+ from dateutil.parser import parse as dateutil_parse
+
try:
self.end_date = dateutil_parse(end_date)
except ValueError:
View
6 setup.py
@@ -24,12 +24,6 @@
'templates/search_configuration/*',
]
},
- requires=[
- 'python_dateutil(>=1.5, < 2.0)',
- ],
- install_requires=[
- 'python_dateutil >= 1.5, < 2.0',
- ],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
Please sign in to comment.
Something went wrong with that request. Please try again.