On Sat, 2006-07-22 at 02:39 +0000, Martin wrote: > Hi, > > I was wondering what is the best way to define new tags which don't > really belong to a specific application. > For example, I would like to create a urlmatch tag: > > {% urlmatch "^accouonts/login/$" } > Should only be display the current url matches the specified reg-ex > {% endurlmatch %} > > Lookin through the documenation I have found how the define new > tags/filters, but only if the are associated to an application. > > I was more thinking about defining middelware which does nothing more > than extending the "defaut" tags. [...]
The recommended way to do this is to create an application that only holds your custom tags. Applications don't have to have models or views or anything like that. That also makes it easy to reuse your tags in other projects: you just reuse that application. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---