()
| 804 | |
| 805 | |
| 806 | def resolve_theme_root(): |
| 807 | themes_root = (BASE_DIR / "themes").resolve() |
| 808 | theme_root = (BASE_DIR / str(settings.themesSelect)).resolve() |
| 809 | try: |
| 810 | theme_root.relative_to(themes_root) |
| 811 | except ValueError: |
| 812 | theme_root = (BASE_DIR / DEFAULT_CONFIG["themesSelect"]).resolve() |
| 813 | if not theme_root.exists(): |
| 814 | theme_root = (BASE_DIR / DEFAULT_CONFIG["themesSelect"]).resolve() |
| 815 | return theme_root |
| 816 | |
| 817 | |
| 818 | def resolve_theme_file(*parts: str): |
no test coverage detected