Open alexbodn opened 7 years ago
Were you using Kajiki directly or through TurboGears? (Asking because turbogears provides a custom FileLoader for kajiki) Can you provide a short example that showcases how autoreload doesn't work?
Asking because the quickstarted app of TG leverages mixing: dotted, standard filenames, dotted with forced extension and seems to properly work:
On first load:
CHECKING provak.templates.index
LOADING provak.templates.index
CHECKING master.xhtml
LOADING master.xhtml
CHECKING tgext.debugbar.templates.debugbar!html
LOADING tgext.debugbar.templates.debugbar!html
On next load:
CHECKING provak.templates.index
FROM CACHE provak.templates.index
CHECKING master.xhtml
FROM CACHE master.xhtml
CHECKING tgext.debugbar.templates.debugbar!html
FROM CACHE tgext.debugbar.templates.debugbar!html
After changing index:
CHECKING provak.templates.index
---> LOADING provak.templates.index
CHECKING master.xhtml
FROM CACHE master.xhtml
CHECKING tgext.debugbar.templates.debugbar!html
FROM CACHE tgext.debugbar.templates.debugbar!html
After changing master:
CHECKING provak.templates.index
FROM CACHE provak.templates.index
CHECKING master.xhtml
---> LOADING master.xhtml
CHECKING tgext.debugbar.templates.debugbar!html
FROM CACHE tgext.debugbar.templates.debugbar!html
I think I understood what you meant.
You are mixing provak.templates.index
and provak/templates/index.html
inside the same app and the two end up being cached with two different cache keys.
thanks @amol for your consideration. i'm happily using tg indeed, and that's the source of the dotted from, thanks. but i'm not calling the same template both ways. even though is may happen somehow ;) . just the '''name''' of the template could not be found in '''self.modules'''. probably one case has been used before and the other after, the '''filename''' method. anyway, reducing all the names dealing to the filename makes most sense to me, since, and as far as, it's all about real files.
one more source of error could be my usage of the templates search path from turbogears. then, the original filenames will be truncated.
hello friends, i'm using kajiki templates as mixed direct and dotted filenames. the reload functionality had to be fixed, so i united it under the smaller common denominator: the resolved filename.
please review my included patch:
alex kajiki.diff.txt