So, I'm trying to write a Django reuse application that provides a way to display your Twitter feed on your page. I know well that it already exists 20 times. This is an academic exercise. :)
The directory structure is quite simple:
myproject
|__ __init__.py
|__ manage.py
|__ settings.py
|__ myapp
|__ __init__.py
|__ admin.py
|__ conf
|__ __init__.py
|__ appsettings.py
|__ feedparser.py
|__ models.py
|__ templates
|__ __init__.py
|__ templatetags
|__ __init__.py
|__ twitterfeed.py
|__ views.py
|__ templates
|__ base.html
|__ urls.py
When starting the Django shell, the functions defined in twitterfeed.py work fine. I also believe that I have template tags correctly named and registered.
As you can see, I use the excellent Universal Parser . My problem is not in UFP itself, but in UFP of the inability to invoke the template tag library when importing. When I'm {% load twitterfeed %}in base.py, I get the following error:
'twitterfeed' : django.templatetags.twitterfeed, No feedparser
feedparser, :
import re, datetime, time, myapp.feedparser
, , . , , , ImportError, Django.
- feedparser.py , - - PythonPath?
!
c_harm