""" | |
Pages package initialization | |
""" | |
# Import all page creation functions | |
try: | |
from pages.dashboard import create_dashboard_page | |
except ImportError as e: | |
print(f"Warning: Could not import dashboard page: {e}") | |
create_dashboard_page = None | |
# You can add more page imports here as needed | |
# from pages.analytics import create_analytics_page | |
# from pages.settings import create_settings_page | |
# from pages.profile import create_profile_page | |
__all__ = [ | |
'create_dashboard_page', | |
# Add other page functions here | |
] | |
# Optional: Create a page registry for dynamic loading | |
PAGE_REGISTRY = { | |
'dashboard': create_dashboard_page, | |
# Add other pages here | |
} | |
def get_page_function(page_name): | |
""" | |
Get page function by name | |
""" | |
return PAGE_REGISTRY.get(page_name) | |
def list_available_pages(): | |
""" | |
List all available pages | |
""" | |
return list(PAGE_REGISTRY.keys()) |