28 lines
699 B
Python
28 lines
699 B
Python
# -*- coding: utf-8 -*-
|
|
"""
|
|
全局配置
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
import reflex as rx
|
|
from reflex.plugins import RadixThemesPlugin
|
|
from reflex_base.plugins.sitemap import SitemapPlugin
|
|
|
|
# 构建数据库路径(使用 SQLite 作为数据库)
|
|
database_path = Path(__file__).parent / "database.db"
|
|
|
|
config = rx.Config(
|
|
app_name="application",
|
|
db_url=f"sqlite:///{database_path.as_posix()}",
|
|
async_db_url=f"sqlite+aiosqlite:///{database_path.as_posix()}",
|
|
disable_plugins=[SitemapPlugin],
|
|
plugins=[
|
|
RadixThemesPlugin(
|
|
theme=rx.theme(
|
|
appearance="dark", accent_color="purple" # 暗黑模式 # 主题色
|
|
)
|
|
)
|
|
],
|
|
)
|