41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
"""
|
|
Utility functions for the website application.
|
|
This package contains various utilities for database management,
|
|
user management, and server administration.
|
|
"""
|
|
|
|
# Import utilities that don't depend on app.py first
|
|
from .db_check import check_db_connection, initialize_db_if_needed
|
|
|
|
# Define the list of all available utilities
|
|
__all__ = [
|
|
# Database utilities
|
|
'check_db_connection',
|
|
'initialize_db_if_needed',
|
|
'fix_database_schema',
|
|
'rebuild_database',
|
|
'test_database_connection',
|
|
'test_models',
|
|
'print_database_stats',
|
|
'run_all_tests',
|
|
|
|
# User management
|
|
'list_users',
|
|
'create_user',
|
|
'reset_password',
|
|
'delete_user',
|
|
'create_admin_user',
|
|
|
|
# Server management (imported separately to avoid circular imports)
|
|
# 'run_development_server' - available in utils.server module
|
|
]
|
|
|
|
# Import remaining modules that might depend on app
|
|
from .db_fix import fix_database_schema
|
|
from .db_rebuild import rebuild_database
|
|
from .db_test import test_database_connection, test_models, print_database_stats, run_all_tests
|
|
from .user_manager import list_users, create_user, reset_password, delete_user, create_admin_user
|
|
# Removed server import to prevent circular import - access via utils.server directly |