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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: touchable-templates
3
- Version: 2026.2.5a0
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
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "touchable-templates"
3
- version = "2026.02.5a"
3
+ version = "2026.02.6a"
4
4
  description = "A dev tool that magically opens templates and partials in your IDE"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -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")
@@ -26,7 +26,7 @@ wheels = [
26
26
 
27
27
  [[package]]
28
28
  name = "touchable-templates"
29
- version = "2026.2.4a0"
29
+ version = "2026.2.5a0"
30
30
  source = { editable = "." }
31
31
  dependencies = [
32
32
  { name = "beautifulsoup4" },