diff --git a/README.md b/README.md index 6c42941..4cd82b0 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,23 @@ ## Introduction +`fastapi-admin` is a fast admin dashboard based on FastAPI and TortoiseORM with [tabler](https://github.com/tabler/tabler) ui, inspired by Django admin. + +**Looking for old version? See branch [v1](https://github.com/fastapi-admin/fastapi-admin/tree/v1)**. + +## Live Demo + +You can check a online demo [here](https://fastapi-admin.long2ice.cn). + +- username: `admin` +- password: `123456` + +## Screenshots + +![](./images/login.png) + +![](./images/dashboard.png) + ## Documentation See documentation at [https://fastapi-admin.github.io/fastapi-admin](https://fastapi-admin.github.io/fastapi-admin). diff --git a/fastapi_admin/constants.py b/fastapi_admin/constants.py index a6af2c5..52294f1 100644 --- a/fastapi_admin/constants.py +++ b/fastapi_admin/constants.py @@ -3,5 +3,5 @@ import os BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S" DATE_FORMAT = "%Y-%m-%d" -DATETIME_FORMAT_MONENT = "YYYY-MM-DD HH:mm:ss" -DATE_FORMAT_MONENT = "YYYY-MM-DD" +DATETIME_FORMAT_MOMENT = "YYYY-MM-DD HH:mm:ss" +DATE_FORMAT_MOMENT = "YYYY-MM-DD" diff --git a/fastapi_admin/widgets/filters.py b/fastapi_admin/widgets/filters.py index ff38fb6..6958256 100644 --- a/fastapi_admin/widgets/filters.py +++ b/fastapi_admin/widgets/filters.py @@ -48,7 +48,7 @@ class Datetime(Filter): self, name: str, label: str, - format_: str = constants.DATE_FORMAT_MONENT, + format_: str = constants.DATE_FORMAT_MOMENT, ): """ Datetime filter @@ -76,7 +76,7 @@ class Date(Datetime): self, name: str, label: str, - format_: str = constants.DATE_FORMAT_MONENT, + format_: str = constants.DATE_FORMAT_MOMENT, ): super().__init__( name, @@ -110,7 +110,12 @@ class Select(Filter): class Enum(Select): def __init__( - self, enum: Type[EnumCLS], name: str, label: str, enum_type: Type = int, null: bool = False + self, + enum: Type[EnumCLS], + name: str, + label: str, + enum_type: Type = int, + null: bool = False, ): super().__init__(name, label, null) self.enum = enum diff --git a/images/dashboard.png b/images/dashboard.png new file mode 100644 index 0000000..6e84c09 Binary files /dev/null and b/images/dashboard.png differ diff --git a/images/login.png b/images/login.png new file mode 100644 index 0000000..c71c9c9 Binary files /dev/null and b/images/login.png differ