File: _templates.py

package info (click to toggle)
python-mne 1.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 100,172 kB
  • sloc: python: 166,349; pascal: 3,602; javascript: 1,472; sh: 334; makefile: 236
file content (25 lines) | stat: -rw-r--r-- 547 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import jinja2

autoescape = jinja2.select_autoescape(
    default=True,
    default_for_string=True
)

# For _html_repr_()
repr_templates_env = jinja2.Environment(
    loader=jinja2.PackageLoader(
        package_name='mne.html_templates',
        package_path='repr'
    ),
    autoescape=autoescape
)

# For mne.Report
report_templates_env = jinja2.Environment(
    loader=jinja2.PackageLoader(
        package_name='mne.html_templates',
        package_path='report'
    ),
    autoescape=autoescape
)
report_templates_env.filters['zip'] = zip