I'm attempting to use python-dateutil to parse the date output from
Feedparser, but continue to get an error when importing the parser.
I'm building a quick filter in a timeutil.py file in a templatetag
folder on the pythonpath
from dateutil.parser import parse
def parsefeedtime(value):
"""Use this to parse the date info out of feedparser when using
the parse_feed or include_feed tags"""
date_published = parse(value)
return date_published
I continue to get the error
"Could not load template library from django.templatetags.timeutiladd,
No module named parser"
I've installed the dateutil via commandline, I deleted the egg and
reinstalled using easy_install, but I keep getting the error.
When I run the function from the python interpreter, it work
perfectly.
>>> from dateutil.parser import parse
>>> value='Thu, 14 Jan 2010 16:51:27 GMT'
>>> x = parse(value)
>>> print x
2010-01-14 16:51:27+00:00
I have no idea why it would work from the python interpreter, but not
from a django templatetag file.
thanks,
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.