On Oct 15, 7:38 am, Chris Amico <[EMAIL PROTECTED]> wrote:
> I have a simple bookmarks model based on the one in James Bennett's <a
> href="http://code.google.com/p/cab/source/browse/trunk/models.py?
> r=130">Cab</a> application. I'm using a generic relation so it can
> live in its own app and a user can bookmark any object on the site
> (I'm planning on reusing this app on a couple projects). I'm running
> into a problem creating an {% if_bookmarked %} template tag.
>
> When I load the tag library I get this error: 'bookmarks' is not a
> valid tag library: Could not load template library from
> django.templatetags.bookmarks, No module named models
>
> Here's what the tag module looks like:
>

<snip>

> The bookmarking model works fine on its own, and I've gotten the
> functions in the template tag to work in isolation in the interpreter,
> but when I load the tag library it breaks the template. What am I
> missing here?

Is the templatetag file itself called bookmarks.py, by any chance? If
so, the code may be trying to import that rather than the top-level
bookmarks directory. Try renaming the file, although I would also
recommend using full paths when importing (ie from
projectname.bookmarks.models).
--
DR
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to