touchable-templates 2026.2.5a0__tar.gz → 2026.2.6a0__tar.gz
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-2026.2.5a0 → touchable_templates-2026.2.6a0}/PKG-INFO +3 -1
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/README.md +2 -0
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/pyproject.toml +1 -1
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/src/touchable_templates/django/loader.py +12 -0
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/uv.lock +1 -1
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/.gitignore +0 -0
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/.python-version +0 -0
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/LICENSE +0 -0
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/src/touchable_templates/__init__.py +0 -0
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/src/touchable_templates/apps.py +0 -0
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/src/touchable_templates/django/middleware.py +0 -0
- {touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/src/touchable_templates/static/js/touchable_templates.js +0 -0
|
@@ -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
|
|
|
@@ -103,6 +103,8 @@ Click on any element on the page to open the corresponding template in your conf
|
|
|
103
103
|
- Use `TOUCHABLE_TEMPLATES_REMOVE_PREFIX` to strip any leading path segments that are
|
|
104
104
|
not part of the local filesystem path (e.g. if your project runs in a Docker container
|
|
105
105
|
with a different root path).
|
|
106
|
+
- Touchable-templates only processes templates that are part of your project.
|
|
107
|
+
It skips templates that are part of third-party packages (e.g. in `site-packages` or `dist-packages`).
|
|
106
108
|
|
|
107
109
|
## Troubleshooting
|
|
108
110
|
|
|
@@ -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")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{touchable_templates-2026.2.5a0 → touchable_templates-2026.2.6a0}/src/touchable_templates/apps.py
RENAMED
|
File without changes
|
|
File without changes
|