Karen,

You were right about the .pyc's -- I had Pydev clean them up and the
error changed.  Here's the new traceback:

http://dpaste.com/50033/

I don't have any other nav.py files -- but anyway, there are other
tags in this file, and with the contenttypes workaround, this one
works too, so long as I get rid of the import path for the Photo
model.

On May 14, 3:17 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Wed, May 14, 2008 at 10:40 AM, Jonathan Lukens <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > I have a custom tag called {% photo %}.  It takes two arguments: an
> > object and a size.
> > I've tinkered with django-photologue to use a GenericForeignKey.  The
> > tag returns the get_SIZE_url() for the Photo instance associated with
> > a given object.  I've posted the code for the tag here:
>
> >http://dpaste.com/49892/
>
> > This raises an error with the following traceback:
>
> >http://dpaste.com/49894/
>
> > What is particularly confusing to me is that the line referenced as
> > raising the error does not exist anywhere in my code tree.
>
> It's got to, the traceback reporting code can't manufacture code that
> doesn't exist.  You must have (or have had at one time) a file with this
> line:
>
> photo = photos.objects.all()[0]
>
> somewhere in your tree. Traceback says it is on line 120 of this file:
>
> /home/jonathan/workspace/datababy/src/datababy/../datababy/templatetags/templatetags/nav.py
>
> Notice the two "templatetags" on the end, since you have an app named
> datababy.templatetags and then Django adds another 'templatetags' on the end
> when it's searching for template tag libraries.  Now, there is some
> screwiness in the way Django searches for and loads template tag libraries,
> but I don't think that could mess up the reporting of what code was running
> in the traceback.  But I could be wrong -- if that file really does not have
> the line listed, then perhaps there is another nav.py file in a templatetags
> subdirectory of one of your other apps that is the one that is actually
> being used?  If I were you I would delete all .pyc files from my tree and
> search and verify that there was one and only one nav.py file to be found
> anywhere.
>
> Karen
>
> Stranger
>
>
>
>
>
> > yet is the fact that if I fiddle with contenttypes to access the Photo
> > model without the import path, everything works exactly as intended.
> > I don't want to do this permanently, however, both because I would
> > like to know what I'm doing wrong and because this is an extra hit on
> > the database.
>
> > I would gladly provide any more information if anyone is able to
> > assist.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to