Pages
1import os
2
3from plain.packages import PackageConfig, packages
4from plain.runtime import APP_PATH
5
6from .registry import registry
7
8
9class PlainPagesConfig(PackageConfig):
10 name = "plain.pages"
11
12 def ready(self):
13 for pacakge_config in packages.get_package_configs():
14 registry.discover_pages(
15 os.path.join(pacakge_config.path, "templates", "pages")
16 )
17
18 registry.discover_pages(os.path.join(APP_PATH, "templates", "pages"))