Return a path to a builtin template. Avoid calling this function at the module level or in a class-definition because __file__ may not exist, e.g. in frozen environments.
(name)
| 18 | |
| 19 | |
| 20 | def builtin_template_path(name): |
| 21 | """ |
| 22 | Return a path to a builtin template. |
| 23 | |
| 24 | Avoid calling this function at the module level or in a class-definition |
| 25 | because __file__ may not exist, e.g. in frozen environments. |
| 26 | """ |
| 27 | return Path(__file__).parent / "templates" / name |
| 28 | |
| 29 | |
| 30 | def set_language(request): |