On 5/25/07, Bob Dively <[EMAIL PROTECTED]> wrote:

This:
> register.simple_tag("media")

Should be this:
register.simple_tag(media)

And I doubt this is causing this problem, but this:
>     'myapp.main.templatetags',

shouldn't be in your INSTALLED_APPS.

'myapp.main' is the app; Django looks in all app   templatetags
subdirs-- the templatetags dir itself is *not* an app.

A short tutorial on debugging, since I hadn't seen this problem before:

The function error you gave is pretty discriptive, but it didn't occur
to me how it was related to your code.

I grep'ed the django source tree for getargspec, and saw it was used
in template/__init__.py.

There, I saw that simple_tag's first argument, func, is passed to
getargspec which, of course, expects a function rather than a string.

That led me to take a closer look at how you were using simple_tag,
and there it is.

So, the basic approach was: how is the error related to the thing I'm
doing?  Where is the function being used?  What's surprising about
this?

Cheers,
  Jeremy

--~--~---------~--~----~------------~-------~--~----~
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