Allow loading template tags by fully qualified python module path
|Reported by:||Patryk Zawadzki||Owned by:||Patryk Zawadzki|
|Cc:||marc.tamlyn@…, paluho@…, ramusus@…, brian@…, skylar.saveland@…||Triage Stage:||Accepted|
|Has patch:||yes||Needs documentation:||yes|
|Needs tests:||yes||Patch needs improvement:||yes|
Currently templatetags are magically searched for in the list of installed apps. This leads to all kind of problems when debugging code, starting from being forced to use find to locate tag libraries and ending with global namespace collisions.
The attached patch adds the possibility to import tags by fully qualified module path by first trying to make an absolute import and only then falling back to searching inside installed apps.
This also allows people to import tag libraries that are not parts of any application (so common tags can be kept together without the need of adding a fake app).
Also: "Explicit is better than implicit." :)
Change History (34)
comment:9 Changed 7 years ago by
comment:20 Changed 4 years ago by
|Owner:||changed from nobody to Patryk Zawadzki|
|Status:||new → assigned|