Re: about templates tags

2007-08-10 Thread rskm1

On Aug 9, 11:23 am, "Lic. José M. Rodriguez Bacallao"
<[EMAIL PROTECTED]> wrote:
> can I include more than one template tag definition in a single template tag
> file? Right  now I was trying  to do that and I can't.

I'm still a novice, but I know you can define multiple filters in
one .py file, and I'm pretty sure you can define multiple tags in
one .py file also.  I'll bet you could even *mix* filter and tag
definitions in the same .py file.

Since you claim you "can't", I would guess that you just forgot to
register one of the tags.
Or maybe you're not returning a Node-subclass object with a render()
method defined.
Or some other problem that is unrelated to it being in the same file
as another tag definition.

def mytagfunc(parser, token):
  # ...
  return myNode
register.tag('mytag', mytagfunc)

def myothertagfunc(parser, token):
  # ...
  return myotherNode
register.tag('myothertag', myothertagfunc)


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



Re: about templates tags

2007-08-09 Thread Collin Grady

Yes, a tag file is a tag library, it does not represent a single tag :)


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



about templates tags

2007-08-09 Thread Lic. José M. Rodriguez Bacallao
can I include more than one template tag definition in a single template tag
file? Right  now I was trying  to do that and I can't.

-- 
Lic. José M. Rodriguez Bacallao
Cupet
-
Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo
mismo.

Recuerda: El arca de Noe fue construida por aficionados, el titanic por
profesionales
-

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