touchable-templates 2026.2.5a0__py3-none-any.whl → 2026.2.6a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- touchable_templates/django/loader.py +12 -0
- {touchable_templates-2026.2.5a0.dist-info → touchable_templates-2026.2.6a0.dist-info}/METADATA +3 -1
- {touchable_templates-2026.2.5a0.dist-info → touchable_templates-2026.2.6a0.dist-info}/RECORD +5 -5
- {touchable_templates-2026.2.5a0.dist-info → touchable_templates-2026.2.6a0.dist-info}/WHEEL +0 -0
- {touchable_templates-2026.2.5a0.dist-info → touchable_templates-2026.2.6a0.dist-info}/licenses/LICENSE +0 -0
|
@@ -28,6 +28,10 @@ IDE_TO_URI_MAPPER = {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
def _is_third_party(filename: str) -> bool:
|
|
32
|
+
return "site-packages" in filename or "dist-packages" in filename
|
|
33
|
+
|
|
34
|
+
|
|
31
35
|
def _get_setting_or_env(name):
|
|
32
36
|
# Prefer Django setting, fall back to environment variable
|
|
33
37
|
return getattr(settings, name, None) or os.environ.get(name)
|
|
@@ -81,6 +85,10 @@ class TouchableTemplatesLoader(FileSystemLoader):
|
|
|
81
85
|
try:
|
|
82
86
|
template_name = getattr(origin, "template_name", None) or getattr(origin, "name", "")
|
|
83
87
|
filename = getattr(origin, "name", "")
|
|
88
|
+
|
|
89
|
+
if _is_third_party(filename):
|
|
90
|
+
return source
|
|
91
|
+
|
|
84
92
|
return _inject_ide_link(source, template_name, filename)
|
|
85
93
|
except Exception:
|
|
86
94
|
logger.exception("touchable_templates: failed to inject IDE link into Django template")
|
|
@@ -106,6 +114,10 @@ class TouchableTemplatesAppDirectoriesLoader(AppDirectoriesLoader):
|
|
|
106
114
|
try:
|
|
107
115
|
template_name = getattr(origin, "template_name", None) or getattr(origin, "name", "")
|
|
108
116
|
filename = getattr(origin, "name", "")
|
|
117
|
+
|
|
118
|
+
if _is_third_party(filename):
|
|
119
|
+
return source
|
|
120
|
+
|
|
109
121
|
return _inject_ide_link(source, template_name, filename)
|
|
110
122
|
except Exception:
|
|
111
123
|
logger.exception("touchable_templates: failed to inject IDE link into Django app template")
|
{touchable_templates-2026.2.5a0.dist-info → touchable_templates-2026.2.6a0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: touchable-templates
|
|
3
|
-
Version: 2026.2.
|
|
3
|
+
Version: 2026.2.6a0
|
|
4
4
|
Summary: A dev tool that magically opens templates and partials in your IDE
|
|
5
5
|
Author: Brady Whitby
|
|
6
6
|
License-Expression: MIT
|
|
@@ -114,6 +114,8 @@ Click on any element on the page to open the corresponding template in your conf
|
|
|
114
114
|
- Use `TOUCHABLE_TEMPLATES_REMOVE_PREFIX` to strip any leading path segments that are
|
|
115
115
|
not part of the local filesystem path (e.g. if your project runs in a Docker container
|
|
116
116
|
with a different root path).
|
|
117
|
+
- Touchable-templates only processes templates that are part of your project.
|
|
118
|
+
It skips templates that are part of third-party packages (e.g. in `site-packages` or `dist-packages`).
|
|
117
119
|
|
|
118
120
|
## Troubleshooting
|
|
119
121
|
|
{touchable_templates-2026.2.5a0.dist-info → touchable_templates-2026.2.6a0.dist-info}/RECORD
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
touchable_templates/__init__.py,sha256=wuVP6KxqX0TnmQegZGdHALFdKInO22IOx2lIbhObvQw,47
|
|
2
2
|
touchable_templates/apps.py,sha256=3qlRtprhZRI5wPnYLEz6QAWHwACeZvKO7RV-C8Gv1Uc,112
|
|
3
|
-
touchable_templates/django/loader.py,sha256=
|
|
3
|
+
touchable_templates/django/loader.py,sha256=ePcYi4TnJjcx2c_TGJ6lAzKJ2X6k0BREK1hzjg9y5lk,4679
|
|
4
4
|
touchable_templates/django/middleware.py,sha256=LYKs-WRO9q_wpQVzFlDxxL5Z2E6Ny49EQwWf2L-Si0o,2147
|
|
5
5
|
touchable_templates/static/js/touchable_templates.js,sha256=9vxxTAWqbN0V5l7UJqjCc5lkNZ00AGn3nYo35Vkr79c,2436
|
|
6
|
-
touchable_templates-2026.2.
|
|
7
|
-
touchable_templates-2026.2.
|
|
8
|
-
touchable_templates-2026.2.
|
|
9
|
-
touchable_templates-2026.2.
|
|
6
|
+
touchable_templates-2026.2.6a0.dist-info/METADATA,sha256=2LKQzLRmD5pAsObqdmiOphfRLDBfXDg_Ijz2bvz7vkg,3740
|
|
7
|
+
touchable_templates-2026.2.6a0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
8
|
+
touchable_templates-2026.2.6a0.dist-info/licenses/LICENSE,sha256=5XdcGaWnUE-XZdjP6bSx-Ad0XTkc6heUI3KckeaRZng,1068
|
|
9
|
+
touchable_templates-2026.2.6a0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|