File tree Expand file tree Collapse file tree
templates/copier-aegis-project/{{ project_slug }}/app/services/insights Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -597,19 +597,21 @@ def _render_template_file(
597597 Returns:
598598 Rendered content, or None if template not found
599599 """
600- # Try with .jinja extension
600+ # Render .jinja templates through Jinja2.
601601 try :
602602 template = self .jinja_env .get_template (f"{ template_file } { JINJA_EXTENSION } " )
603603 return template .render (context )
604604 except TemplateNotFound :
605605 pass
606606
607- # Try without extension
608- try :
609- template = self .jinja_env .get_template (template_file )
610- return template .render (context )
611- except TemplateNotFound :
612- return None
607+ # Non-.jinja files are copied verbatim — same contract Copier uses.
608+ # Rendering them through Jinja2 breaks any source that legitimately
609+ # contains brace syntax (Python f-string {{...}} escapes, Alpine/HTMX
610+ # attributes, CSS in inline strings, etc.).
611+ raw_path = self .template_path / template_file
612+ if raw_path .is_file ():
613+ return raw_path .read_text ()
614+ return None
613615
614616 def install_plugin_template_tree (self , plugin_module_name : str ) -> list [str ]:
615617 """Render the plugin's template tree into the project.
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ class CollectorService:
286286 current_record = max(current_record, val)
287287
288288 if record_value > current_record:
289- desc = f"{record_value:,} ({check['label']})"
289+ desc = f"⬢ {record_value:,} ({check['label']})"
290290 event = InsightEvent(
291291 date=datetime.strptime(record_date, "%Y-%m-%d"),
292292 event_type=check["event_type"],
@@ -368,7 +368,7 @@ class CollectorService:
368368 current_record = max(current_record, val)
369369
370370 if rolling_value > current_record:
371- desc = f"{rolling_value:,} ({check['label']})"
371+ desc = f"⬢ {rolling_value:,} ({check['label']})"
372372 event = InsightEvent(
373373 date=now,
374374 event_type=check["event_type"],
You can’t perform that action at this time.
0 commit comments