|
I have a custom module and need to create a custom template filter. I used this reference http://meta.osqa.net/questions/5528/can-a-forum-module-define-template-tags and created this setup: in mymodule_tags.py:
in startup.py:
in mytemplate.html:
however, this just gets me the error: invalid filter 'customfilter' |
|
Try changing your startup.py to this:
Otherwise, that looks like it should work. @Kevin Yank: that didn't fix it (btw, thanks for the reply). I looked over it several times now and I don't think I have any typos or things like that. mymodule_tags.py and startup.py should both be placed in my module's main folder, correct? I can't imagine why this isn't working.
(20 Dec '10, 20:56)
rsp
|
|
I faced the same problems-- and figured out a solution. Does this answer work for you? http://meta.osqa.net/questions/6277/how-to-enable-my-osqa-modules-custom-tag-to-load-a-custom-filter @Justin Grant thanks, but that doesn't seem to work either. I even checked out the latest osqa release to see if that helped. I have the exact problem you described: if my module is in the forum/templatetags folder everything works fine, but if its in my module's folder it doesn't work. I tried your solution, which seems like it should work, but it doesn't.
(31 Dec '10, 21:34)
rsp
|