update front and example

This commit is contained in:
long2ice
2020-04-25 18:20:27 +08:00
parent 61f2409cb9
commit d5c26c0ba2
15 changed files with 454 additions and 438 deletions

View File

@ -22,13 +22,17 @@
DROP TABLE IF EXISTS `category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `category` (
CREATE TABLE `category`
(
`id` int NOT NULL AUTO_INCREMENT,
`slug` varchar(200) NOT NULL,
`name` varchar(200) NOT NULL,
`created_at` datetime(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE = InnoDB
AUTO_INCREMENT = 10
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -36,9 +40,20 @@ CREATE TABLE `category` (
--
LOCK TABLES `category` WRITE;
/*!40000 ALTER TABLE `category` DISABLE KEYS */;
INSERT INTO `category` VALUES (1,'test','test','2020-04-13 15:16:25.000000'),(2,'test','test','2020-04-13 15:16:25.000000'),(3,'test','test','2020-04-13 15:16:25.000000'),(4,'test','test','2020-04-13 15:16:25.000000'),(5,'test','test','2020-04-13 15:16:25.000000'),(6,'test','test','2020-04-13 15:16:25.000000'),(7,'test','test','2020-04-13 15:16:25.000000'),(8,'test','test','2020-04-13 15:16:25.000000'),(9,'test','test','2020-04-13 15:16:25.000000');
/*!40000 ALTER TABLE `category` ENABLE KEYS */;
/*!40000 ALTER TABLE `category`
DISABLE KEYS */;
INSERT INTO `category`
VALUES (1, 'test', 'test', '2020-04-13 15:16:25.000000'),
(2, 'test', 'test', '2020-04-13 15:16:25.000000'),
(3, 'test', 'test', '2020-04-13 15:16:25.000000'),
(4, 'test', 'test', '2020-04-13 15:16:25.000000'),
(5, 'test', 'test', '2020-04-13 15:16:25.000000'),
(6, 'test', 'test', '2020-04-13 15:16:25.000000'),
(7, 'test', 'test', '2020-04-13 15:16:25.000000'),
(8, 'test', 'test', '2020-04-13 15:16:25.000000'),
(9, 'test', 'test', '2020-04-13 15:16:25.000000');
/*!40000 ALTER TABLE `category`
ENABLE KEYS */;
UNLOCK TABLES;
--
@ -48,13 +63,17 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `permission` (
CREATE TABLE `permission`
(
`id` int NOT NULL AUTO_INCREMENT,
`label` varchar(50) NOT NULL,
`model` varchar(50) NOT NULL,
`action` smallint NOT NULL COMMENT 'create: 1\ndelete: 2\nupdate: 3\nread: 4',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE = InnoDB
AUTO_INCREMENT = 42
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -62,9 +81,31 @@ CREATE TABLE `permission` (
--
LOCK TABLES `permission` WRITE;
/*!40000 ALTER TABLE `permission` DISABLE KEYS */;
INSERT INTO `permission` VALUES (22,'Delete Category','Category',2),(23,'Update Category','Category',3),(24,'Read Category','Category',4),(25,'Create Product','Product',1),(26,'Delete Product','Product',2),(27,'Update Product','Product',3),(28,'Read Product','Product',4),(29,'Create User','User',1),(30,'Delete User','User',2),(31,'Update User','User',3),(32,'Read User','User',4),(33,'Create Permission','Permission',1),(34,'Delete Permission','Permission',2),(35,'Update Permission','Permission',3),(36,'Read Permission','Permission',4),(37,'Create Role','Role',1),(38,'Delete Role','Role',2),(39,'Update Role','Role',3),(40,'Read Role','Role',4),(41,'Create Category','Category',1);
/*!40000 ALTER TABLE `permission` ENABLE KEYS */;
/*!40000 ALTER TABLE `permission`
DISABLE KEYS */;
INSERT INTO `permission`
VALUES (22, 'Delete Category', 'Category', 2),
(23, 'Update Category', 'Category', 3),
(24, 'Read Category', 'Category', 4),
(25, 'Create Product', 'Product', 1),
(26, 'Delete Product', 'Product', 2),
(27, 'Update Product', 'Product', 3),
(28, 'Read Product', 'Product', 4),
(29, 'Create User', 'User', 1),
(30, 'Delete User', 'User', 2),
(31, 'Update User', 'User', 3),
(32, 'Read User', 'User', 4),
(33, 'Create Permission', 'Permission', 1),
(34, 'Delete Permission', 'Permission', 2),
(35, 'Update Permission', 'Permission', 3),
(36, 'Read Permission', 'Permission', 4),
(37, 'Create Role', 'Role', 1),
(38, 'Delete Role', 'Role', 2),
(39, 'Update Role', 'Role', 3),
(40, 'Read Role', 'Role', 4),
(41, 'Create Category', 'Category', 1);
/*!40000 ALTER TABLE `permission`
ENABLE KEYS */;
UNLOCK TABLES;
--
@ -74,7 +115,8 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `product`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product` (
CREATE TABLE `product`
(
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`view_num` int NOT NULL,
@ -85,7 +127,10 @@ CREATE TABLE `product` (
`body` longtext NOT NULL,
`created_at` datetime(6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE = InnoDB
AUTO_INCREMENT = 10
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -93,9 +138,20 @@ CREATE TABLE `product` (
--
LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
INSERT INTO `product` VALUES (1,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(2,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(3,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(4,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(5,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(6,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(7,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(8,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(9,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000');
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
/*!40000 ALTER TABLE `product`
DISABLE KEYS */;
INSERT INTO `product`
VALUES (1, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000'),
(2, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000'),
(3, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000'),
(4, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000'),
(5, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000'),
(6, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000'),
(7, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000'),
(8, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000'),
(9, 'Phone', 10, 1, 1, 1, 'https://github.com/long2ice/fastapi-admin', 'test', '2020-04-13 15:16:56.000000');
/*!40000 ALTER TABLE `product`
ENABLE KEYS */;
UNLOCK TABLES;
--
@ -105,14 +161,17 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `product_category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product_category` (
CREATE TABLE `product_category`
(
`product_id` int NOT NULL,
`category_id` int NOT NULL,
KEY `product_id` (`product_id`),
KEY `category_id` (`category_id`),
CONSTRAINT `product_category_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`) ON DELETE CASCADE,
CONSTRAINT `product_category_ibfk_2` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -120,9 +179,12 @@ CREATE TABLE `product_category` (
--
LOCK TABLES `product_category` WRITE;
/*!40000 ALTER TABLE `product_category` DISABLE KEYS */;
INSERT INTO `product_category` VALUES (1,1);
/*!40000 ALTER TABLE `product_category` ENABLE KEYS */;
/*!40000 ALTER TABLE `product_category`
DISABLE KEYS */;
INSERT INTO `product_category`
VALUES (1, 1);
/*!40000 ALTER TABLE `product_category`
ENABLE KEYS */;
UNLOCK TABLES;
--
@ -132,11 +194,15 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `role` (
CREATE TABLE `role`
(
`id` int NOT NULL AUTO_INCREMENT,
`label` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE = InnoDB
AUTO_INCREMENT = 2
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -144,9 +210,12 @@ CREATE TABLE `role` (
--
LOCK TABLES `role` WRITE;
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
INSERT INTO `role` VALUES (1,'user');
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
/*!40000 ALTER TABLE `role`
DISABLE KEYS */;
INSERT INTO `role`
VALUES (1, 'user');
/*!40000 ALTER TABLE `role`
ENABLE KEYS */;
UNLOCK TABLES;
--
@ -156,14 +225,17 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `role_permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `role_permission` (
CREATE TABLE `role_permission`
(
`role_id` int NOT NULL,
`permission_id` int NOT NULL,
KEY `role_id` (`role_id`),
KEY `permission_id` (`permission_id`),
CONSTRAINT `role_permission_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_permission_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `permission` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -171,9 +243,12 @@ CREATE TABLE `role_permission` (
--
LOCK TABLES `role_permission` WRITE;
/*!40000 ALTER TABLE `role_permission` DISABLE KEYS */;
INSERT INTO `role_permission` VALUES (1,28);
/*!40000 ALTER TABLE `role_permission` ENABLE KEYS */;
/*!40000 ALTER TABLE `role_permission`
DISABLE KEYS */;
INSERT INTO `role_permission`
VALUES (1, 28);
/*!40000 ALTER TABLE `role_permission`
ENABLE KEYS */;
UNLOCK TABLES;
--
@ -183,14 +258,17 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `role_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `role_user` (
CREATE TABLE `role_user`
(
`role_id` int NOT NULL,
`user_id` int NOT NULL,
KEY `role_id` (`role_id`),
KEY `user_id` (`user_id`),
CONSTRAINT `role_user_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`) ON DELETE CASCADE,
CONSTRAINT `role_user_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -198,9 +276,12 @@ CREATE TABLE `role_user` (
--
LOCK TABLES `role_user` WRITE;
/*!40000 ALTER TABLE `role_user` DISABLE KEYS */;
INSERT INTO `role_user` VALUES (1,7);
/*!40000 ALTER TABLE `role_user` ENABLE KEYS */;
/*!40000 ALTER TABLE `role_user`
DISABLE KEYS */;
INSERT INTO `role_user`
VALUES (1, 7);
/*!40000 ALTER TABLE `role_user`
ENABLE KEYS */;
UNLOCK TABLES;
--
@ -210,7 +291,8 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user` (
CREATE TABLE `user`
(
`id` int NOT NULL AUTO_INCREMENT,
`username` varchar(20) NOT NULL,
`password` varchar(200) NOT NULL,
@ -222,7 +304,10 @@ CREATE TABLE `user` (
`is_superuser` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
) ENGINE = InnoDB
AUTO_INCREMENT = 8
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@ -230,9 +315,17 @@ CREATE TABLE `user` (
--
LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (1,'long2ice','$2b$12$CD5ImAgBr7TZpJABxuXASOXz/cAFMIhXsmnZCU.cvo/c.kOOpSkXq','2020-04-13 12:44:06.000000',1,'https://c-ssl.duitang.com/uploads/item/201901/09/20190109072726_aNNZd.thumb.1000_0.jpeg','test','2020-04-13 12:44:14.000000',1),(7,'test','$2b$12$CD5ImAgBr7TZpJABxuXASOXz/cAFMIhXsmnZCU.cvo/c.kOOpSkXq','2020-04-14 16:54:40.510165',1,'http://localhost:8080/#/rest/User/7/edit','http://localhost:8080/#/rest/User/7/edit','2020-04-14 16:54:40.510555',0);
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
/*!40000 ALTER TABLE `user`
DISABLE KEYS */;
INSERT INTO `user`
VALUES (1, 'long2ice', '$2b$12$CD5ImAgBr7TZpJABxuXASOXz/cAFMIhXsmnZCU.cvo/c.kOOpSkXq', '2020-04-13 12:44:06.000000', 1,
'https://avatars2.githubusercontent.com/u/13377178?s=460&u=d150d522579f41a52a0b3dd8ea997e0161313b6e&v=4',
'test', '2020-04-13 12:44:14.000000', 1),
(7, 'test', '$2b$12$CD5ImAgBr7TZpJABxuXASOXz/cAFMIhXsmnZCU.cvo/c.kOOpSkXq', '2020-04-14 16:54:40.510165', 1,
'https://avatars2.githubusercontent.com/u/13377178?s=460&u=d150d522579f41a52a0b3dd8ea997e0161313b6e&v=4',
'test', '2020-04-14 16:54:40.510555', 0);
/*!40000 ALTER TABLE `user`
ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE = @OLD_TIME_ZONE */;

View File

@ -51,7 +51,7 @@ def create_app():
logo='https://github.com/long2ice/fastapi-admin/raw/master/front/static/img/logo.png',
locale='en-US',
locale_switcher=True,
menu=[
menus=[
Menu(
name='Home',
url='/',
@ -67,7 +67,8 @@ def create_app():
icon='icon-list',
search_fields=('type',),
fields_type={
'type': 'radiolist'
'type': 'radiolist',
'image': 'link'
},
bulk_actions=[
{
@ -104,7 +105,10 @@ def create_app():
url='/rest/User',
icon='fa fa-user',
exclude=('password',),
search_fields=('username',)
search_fields=('username',),
fields_type={
'avatar': 'image'
},
),
Menu(
name='Role',

View File

@ -1,3 +1,3 @@
from . import routes
__version__ = '0.2.1'
__version__ = '0.2.2'

View File

@ -4,11 +4,4 @@ from pydantic import BaseModel
class GetManyOut(BaseModel):
total: int
per_page: int = 10
page: int = 1
data: Sequence[Dict]
class Config:
fields = {
'per_page': 'perPage'
}

View File

@ -19,9 +19,9 @@ class Menu(BaseModel):
# external link
external: Optional[bool] = False
# raw id fields
raw_id_fields: Optional[Set[str]] = set()
raw_id_fields: Optional[Tuple[str]] = set()
# searchable fields
search_fields: Optional[Set[str]] = set()
search_fields: Optional[Tuple[str]] = set()
# sortable fields
sort_fields: Optional[Set[str]] = set()
# define field type,like select,radiolist,text,date
@ -54,11 +54,6 @@ class Site(BaseModel):
# custom footer with html
footer: Optional[str]
class Config:
fields = {
'menus': 'menu'
}
class Field(BaseModel):
label: str

View File

@ -5,11 +5,12 @@
<div v-html="value" class=" data-value-html"></div>
</template>
<template v-else-if="['number'].includes(field.type)">
<div class=" text-right">{{value}}</div>
<div>{{value}}</div>
</template>
<template v-else-if="['image'].includes(field.type)">
<template v-if="field.multiple">
<b-img class="type-image" :key="v" v-for="v in value" :src="preview(v)" v-bind="field" @click.stop="previewInModal(v)"/>
<b-img class="type-image" :key="v" v-for="v in value" :src="preview(v)" v-bind="field"
@click.stop="previewInModal(v)"/>
</template>
<b-img class="type-image" v-else :src="preview(value)" v-bind="field" fluid @click.stop="previewInModal(value)"/>
</template>
@ -28,7 +29,7 @@
<template v-else-if="['link'].includes(field.type)">
<a :class="field.classes" :href="value" :target="field.target">
<i :class="field.icon" v-if="field.icon"></i>
{{field.text || field.label}}
{{value}}
</a>
</template>
@ -55,7 +56,7 @@
</template>
</template>
<template v-else-if="name === $config.primaryKey">
<template v-else-if="name === pk">
<span v-b-tooltip.hover.top.d100 :title="value" v-if="value">
{{String(shortId ? String(value).substr(-4) : value).toUpperCase()}}
</span>
@ -100,6 +101,10 @@ export default {
required: true,
type: Object
},
pk: {
required: true,
type: Intl
},
name: {
required: true,
type: String
@ -108,9 +113,7 @@ export default {
required: true,
type: Object
},
lang: {
},
lang: {},
shortId: {
required: false,
type: Boolean,
@ -170,6 +173,7 @@ export default {
max-height: inherit;
max-width: 100%;
}
.data-value-html {
max-height: 500px;
max-width: 420px;
@ -182,6 +186,7 @@ export default {
}
}
}
.data-value {
.type-image {
max-width: 100%;

View File

@ -1,97 +0,0 @@
<template>
<b-aside class="sidebar position-fixed">
<div class="text-center top">
<a :href="site.url" target="_blank" v-if="site.logo">
<img class="site-logo img-fluid" :src="site.logo">
</a>
<!-- <b-img class="site-logo" :src="require('../assets/img/gengyi-logo.svg')" fluid style="border-radius: 5px;" /> -->
<!-- <b-img rounded="circle" :src="auth.user.avatar" height="70" blank-color="#777" alt="avatar" class="m-2" /> -->
<div class="my-3" v-if="site.sidebar_userinfo !== false">
<h5 style="letter-spacing:2px">{{site.name}}</h5>
<template v-if="auth.user">
<b-badge class="text-uppercase mr-1" v-if="auth.user.badge">{{auth.user.badge}}</b-badge>
<span>{{auth.user.username}}</span>
</template>
</div>
<div v-else></div>
<!-- <locale-switcher></locale-switcher> -->
<!-- <theme-switcher></theme-switcher> -->
</div>
<el-menu router>
<template v-for="(item, index) in site.menu" >
<el-submenu :index="item.url" :key="index" v-if="item.children">
<template slot="title">
<i :class="item.icon"></i>
<span>{{item.name}}</span>
</template>
</el-submenu>
<el-menu-item :index="item.url" :key="index" v-else>
<i :class="item.icon"></i>
<span class="">{{item.name}}</span>
</el-menu-item>
</template>
</el-menu>
</b-aside>
</template>
<script>
import ThemeSwitcher from "./ThemeSwitcher";
import LocaleSwitcher from "./LocaleSwitcher";
import { mapState } from "vuex";
export default {
name: "sidebar",
computed: {
...mapState(["auth", "site"])
},
components: { LocaleSwitcher, ThemeSwitcher },
methods: {
toggle(item) {
this.$set(item, "open", !item.open);
}
}
};
</script>
<style lang="scss">
// .sidebar {
// z-index: 999;
// box-shadow: 1px 0 20px rgba(0, 0, 0, 0.1);
// width: 200px;
// height: 100vh;
// overflow: auto;
// letter-spacing: 1px;
// padding: 1rem;
// .site-logo {
// // border-radius: 1rem;
// // min-height:3em;
// }
// .nav-link {
// color: #666;
// display: flex;
// align-items: center;
// padding: 0.7rem 1rem;
// // border-radius: 2rem;
// // font-weight: 400;
// &:hover,
// &.active {
// // color: #333;
// // background: #eee;
// }
// i {
// margin-right: 1rem;
// }
// }
// .nav-title {
// font-size: 0.7rem;
// font-weight: bold;
// text-transform: uppercase;
// color: #ced4da;
// padding: 1rem 1rem 0.5rem 0;
// }
// }
</style>

View File

@ -21,7 +21,7 @@
</div>
<div slot="header"></div>
<b-nav pills class="sidebar-nav" vertical>
<template v-for="(item, index) in site.menu">
<template v-for="(item, index) in site.menus">
<b-nav-text v-if="item.title" :key="index">
<small class="text-muted">
<b>{{item.name}}</b>
@ -71,22 +71,22 @@
computed: {
...mapState(["auth", "site"]),
menu() {
const menu = [];
menus() {
const menus = [];
const titleIndices = [];
this.site.menu.forEach((v, k) => {
this.site.menus.forEach((v, k) => {
v.title && titleIndices.push(parseInt(k));
});
for (let i in titleIndices) {
menu.push({
name: this.site.menu[titleIndices[i]].name,
children: this.site.menu.slice(
menus.push({
name: this.site.menus[titleIndices[i]].name,
children: this.site.menus.slice(
titleIndices[i] + 1,
titleIndices[parseInt(i) + 1]
)
});
}
return menu;
return menus;
}
},
components: {LocaleSwitcher, ThemeSwitcher},

View File

@ -1,3 +0,0 @@
export default {
"primaryKey": process.env.VUE_APP_PRIMARY_KEY || 'id'
}

View File

@ -8,9 +8,7 @@ import router from './router'
import store, { types } from './store'
import './http'
import i18n from './i18n'
import config from './config'
import inflection from 'inflection'
Vue.prototype.$config = config
Vue.prototype.$inflection = inflection
import { sync } from 'vuex-router-sync'

View File

@ -10,7 +10,7 @@ export default {
name: "",
url: "",
description: "",
menu: menu,
menus: menu,
languages: false,
footer: false,
theme: "cosmo",

View File

@ -66,10 +66,8 @@
></b-pagination>
</div>
<div class="col-md-4 form-inline justify-content-end">
<b-select v-model="currentPage" class="mx-2">
<option v-for="n in Math.ceil(total/perPage)" :key="n" :value="n">{{n}}</option>
<b-select v-model="perPage" :options="pages" class="mx-2">
</b-select>
<span>{{$t('messages.paginate', {total: total})}}</span>
</div>
</div>
@ -80,6 +78,7 @@
:items="fetchItems"
:fields="columns"
selectable
:per-page="perPage"
@row-selected="onRowSelected"
:select-mode="selectModel"
:current-page="currentPage"
@ -95,8 +94,35 @@
>{{field.label || key}}
</div>
</template>
<template v-slot:cell()="data">
<template v-if="['datetime', 'date'].includes(data.field.type)">
{{$d(new Date(data.value), 'long')}}
</template>
<template v-else-if="['image'].includes(data.field.type)">
<b-img width="50px" class="type-image" :src="data.value" fluid/>
</template>
<template v-else-if="['link'].includes(data.field.type)">
<a :class="data.field.classes" :href="data.value" :target="data.field.target">
<i :class="data.field.icon" v-if="data.field.icon"></i>
{{data.value}}
</a>
</template>
<template v-else-if="['switch', 'boolean', 'checkbox'].includes(data.field.type)">
<b-badge :variant="data.value ? 'success' : 'danger'">
{{data.value ? 'Yes' : 'No'}}
</b-badge>
</template>
<template v-else-if="['html'].includes(data.field.type)">
<div v-html="data.value" class=" data-value-html"></div>
</template>
<template v-else>
{{ data.value}}
</template>
</template>
<template v-for="(field, key) in table.fields" :slot="key" slot-scope="row">
<b-data-value :field="field" :key="key" :name="key" :model="row.item" short-id/>
<b-data-value :field="field" :key="key" :name="key" :model="row.item" :pk="pk" short-id/>
</template>
<template v-slot:cell(_actions)="row">
@ -171,8 +197,8 @@
table: {},
modes: ['multi', 'single', 'range'],
selectModel: 'range',
total: 0, //total rows
pageLimit: 10, //display how many page buttons
total: 0,
pageLimit: 10,
currentPage: 1,
sortBy: this.pk,
sortDesc: true,
@ -182,7 +208,8 @@
pk: null,
selected_pk_list: [],
bulkActions: {},
selectBulkAction: null
selectBulkAction: null,
pages: [10, 50, 100]
};
},
watch: {
@ -291,6 +318,7 @@
fetchItems(ctx) {
const query = _.merge({}, _.get(this.table, "query"), {
page: ctx.currentPage,
size: ctx.perPage,
sort: {[ctx.sortBy]: this.sortDesc ? -1 : 1},
where: this.where,
with: this.populate
@ -351,7 +379,7 @@
}).catch(error => {
this.table = {}
});
}
},
},
mounted() {
},

138
poetry.lock generated
View File

@ -133,7 +133,7 @@ description = "cryptography is a package which provides cryptographic recipes an
name = "cryptography"
optional = false
python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
version = "2.9"
version = "2.9.2"
[package.dependencies]
cffi = ">=1.8,<1.11.3 || >1.11.3"
@ -362,7 +362,7 @@ description = "Fast, correct Python JSON library supporting dataclasses, datetim
name = "orjson"
optional = false
python-versions = ">=3.6"
version = "2.6.5"
version = "2.6.6"
[[package]]
category = "main"
@ -417,7 +417,7 @@ description = "Data validation and settings management using python 3.6 type hin
name = "pydantic"
optional = false
python-versions = ">=3.6"
version = "1.4"
version = "1.5.1"
[package.extras]
dotenv = ["python-dotenv (>=0.10.4)"]
@ -454,7 +454,7 @@ description = "A SQL query builder API for Python"
name = "pypika"
optional = false
python-versions = "*"
version = "0.36.3"
version = "0.37.1"
[[package]]
category = "main"
@ -462,7 +462,7 @@ description = "Add .env support to your django/flask apps in development and dep
name = "python-dotenv"
optional = false
python-versions = "*"
version = "0.12.0"
version = "0.13.0"
[package.extras]
cli = ["click (>=5.0)"]
@ -564,19 +564,19 @@ description = "Easy async ORM for python, built with relations in mind"
name = "tortoise-orm"
optional = false
python-versions = "*"
version = "0.16.5"
version = "0.16.8"
[package.dependencies]
aiosqlite = ">=0.11.0"
ciso8601 = ">=2.1.2"
iso8601 = ">=0.1.12"
pypika = ">=0.36.1"
pypika = ">=0.36.5"
typing-extensions = ">=3.7"
[package.source]
reference = "cde9d7bff4568c7549e89c8360e8a55b8b1dd46c"
reference = "0b2c1dced0f036880f0e6cd6c3092ebd24c5674a"
type = "git"
url = "https://github.com/long2ice/tortoise-orm.git"
url = "https://github.com/tortoise/tortoise-orm.git"
[[package]]
category = "main"
description = "Backported and Experimental Type Hints for Python 3.5+"
@ -599,11 +599,11 @@ description = "HTTP library with thread-safe connection pooling, file post, and
name = "urllib3"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4"
version = "1.25.8"
version = "1.25.9"
[package.extras]
brotli = ["brotlipy (>=0.6.0)"]
secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"]
secure = ["certifi", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "pyOpenSSL (>=0.14)", "ipaddress"]
socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"]
[[package]]
@ -654,7 +654,7 @@ python-versions = "*"
version = "1.2.8"
[metadata]
content-hash = "9c9adb8acd429a938c06fd7ad2da8b3416af5edfd391c38f3e7a8ffb3bd0db74"
content-hash = "a1accf201017038ddeeb93c3bc918366e854ce8160effdd668f19eba1ac60ad2"
python-versions = "^3.8"
[metadata.files]
@ -755,25 +755,25 @@ colorama = [
{file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"},
]
cryptography = [
{file = "cryptography-2.9-cp27-cp27m-macosx_10_9_intel.whl", hash = "sha256:ef9a55013676907df6c9d7dd943eb1770d014f68beaa7e73250fb43c759f4585"},
{file = "cryptography-2.9-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:2a2ad24d43398d89f92209289f15265107928f22a8d10385f70def7a698d6a02"},
{file = "cryptography-2.9-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:95e1296e0157361fe2f5f0ed307fd31f94b0ca13372e3673fa95095a627636a1"},
{file = "cryptography-2.9-cp27-cp27m-win32.whl", hash = "sha256:192ca04a36852a994ef21df13cca4d822adbbdc9d5009c0f96f1d2929e375d4f"},
{file = "cryptography-2.9-cp27-cp27m-win_amd64.whl", hash = "sha256:ed1d0760c7e46436ec90834d6f10477ff09475c692ed1695329d324b2c5cd547"},
{file = "cryptography-2.9-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:19ae795137682a9778892fb4390c07811828b173741bce91e30f899424b3934d"},
{file = "cryptography-2.9-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:d1bf5a1a0d60c7f9a78e448adcb99aa101f3f9588b16708044638881be15d6bc"},
{file = "cryptography-2.9-cp35-abi3-macosx_10_9_intel.whl", hash = "sha256:1b9b535d6b55936a79dbe4990b64bb16048f48747c76c29713fea8c50eca2acf"},
{file = "cryptography-2.9-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:7a279f33a081d436e90e91d1a7c338553c04e464de1c9302311a5e7e4b746088"},
{file = "cryptography-2.9-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:49870684da168b90110bbaf86140d4681032c5e6a2461adc7afdd93be5634216"},
{file = "cryptography-2.9-cp35-cp35m-win32.whl", hash = "sha256:6b91cab3841b4c7cb70e4db1697c69f036c8bc0a253edc0baa6783154f1301e4"},
{file = "cryptography-2.9-cp35-cp35m-win_amd64.whl", hash = "sha256:587f98ce27ac4547177a0c6fe0986b8736058daffe9160dcf5f1bd411b7fbaa1"},
{file = "cryptography-2.9-cp36-cp36m-win32.whl", hash = "sha256:cc20316e3f5a6b582fc3b029d8dc03aabeb645acfcb7fc1d9848841a33265748"},
{file = "cryptography-2.9-cp36-cp36m-win_amd64.whl", hash = "sha256:3be7a5722d5bfe69894d3f7bbed15547b17619f3a88a318aab2e37f457524164"},
{file = "cryptography-2.9-cp37-cp37m-win32.whl", hash = "sha256:7598974f6879a338c785c513e7c5a4329fbc58b9f6b9a6305035fca5b1076552"},
{file = "cryptography-2.9-cp37-cp37m-win_amd64.whl", hash = "sha256:5aca6f00b2f42546b9bdf11a69f248d1881212ce5b9e2618b04935b87f6f82a1"},
{file = "cryptography-2.9-cp38-cp38-win32.whl", hash = "sha256:9fc9da390e98cb6975eadf251b6e5fa088820141061bf041cd5c72deba1dc526"},
{file = "cryptography-2.9-cp38-cp38-win_amd64.whl", hash = "sha256:6b744039b55988519cc183149cceb573189b3e46e16ccf6f8c46798bb767c9dc"},
{file = "cryptography-2.9.tar.gz", hash = "sha256:0cacd3ef5c604b8e5f59bf2582c076c98a37fe206b31430d0cd08138aff0986e"},
{file = "cryptography-2.9.2-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:daf54a4b07d67ad437ff239c8a4080cfd1cc7213df57d33c97de7b4738048d5e"},
{file = "cryptography-2.9.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:3b3eba865ea2754738616f87292b7f29448aec342a7c720956f8083d252bf28b"},
{file = "cryptography-2.9.2-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:c447cf087cf2dbddc1add6987bbe2f767ed5317adb2d08af940db517dd704365"},
{file = "cryptography-2.9.2-cp27-cp27m-win32.whl", hash = "sha256:f118a95c7480f5be0df8afeb9a11bd199aa20afab7a96bcf20409b411a3a85f0"},
{file = "cryptography-2.9.2-cp27-cp27m-win_amd64.whl", hash = "sha256:c4fd17d92e9d55b84707f4fd09992081ba872d1a0c610c109c18e062e06a2e55"},
{file = "cryptography-2.9.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:d0d5aeaedd29be304848f1c5059074a740fa9f6f26b84c5b63e8b29e73dfc270"},
{file = "cryptography-2.9.2-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:1e4014639d3d73fbc5ceff206049c5a9a849cefd106a49fa7aaaa25cc0ce35cf"},
{file = "cryptography-2.9.2-cp35-abi3-macosx_10_9_x86_64.whl", hash = "sha256:96c080ae7118c10fcbe6229ab43eb8b090fccd31a09ef55f83f690d1ef619a1d"},
{file = "cryptography-2.9.2-cp35-abi3-manylinux1_x86_64.whl", hash = "sha256:e993468c859d084d5579e2ebee101de8f5a27ce8e2159959b6673b418fd8c785"},
{file = "cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl", hash = "sha256:88c881dd5a147e08d1bdcf2315c04972381d026cdb803325c03fe2b4a8ed858b"},
{file = "cryptography-2.9.2-cp35-cp35m-win32.whl", hash = "sha256:651448cd2e3a6bc2bb76c3663785133c40d5e1a8c1a9c5429e4354201c6024ae"},
{file = "cryptography-2.9.2-cp35-cp35m-win_amd64.whl", hash = "sha256:726086c17f94747cedbee6efa77e99ae170caebeb1116353c6cf0ab67ea6829b"},
{file = "cryptography-2.9.2-cp36-cp36m-win32.whl", hash = "sha256:091d31c42f444c6f519485ed528d8b451d1a0c7bf30e8ca583a0cac44b8a0df6"},
{file = "cryptography-2.9.2-cp36-cp36m-win_amd64.whl", hash = "sha256:bb1f0281887d89617b4c68e8db9a2c42b9efebf2702a3c5bf70599421a8623e3"},
{file = "cryptography-2.9.2-cp37-cp37m-win32.whl", hash = "sha256:18452582a3c85b96014b45686af264563e3e5d99d226589f057ace56196ec78b"},
{file = "cryptography-2.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:22e91636a51170df0ae4dcbd250d318fd28c9f491c4e50b625a49964b24fe46e"},
{file = "cryptography-2.9.2-cp38-cp38-win32.whl", hash = "sha256:844a76bc04472e5135b909da6aed84360f522ff5dfa47f93e3dd2a0b84a89fa0"},
{file = "cryptography-2.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:1dfa985f62b137909496e7fc182dac687206d8d089dd03eaeb28ae16eec8e7d5"},
{file = "cryptography-2.9.2.tar.gz", hash = "sha256:a0c30272fb4ddda5f5ffc1089d7405b7a71b0b0f51993cb4e5dbb4590b2fc229"},
]
dnspython = [
{file = "dnspython-1.16.0-py2.py3-none-any.whl", hash = "sha256:f69c21288a962f4da86e56c4905b49d11aba7938d3d740e80d9e366ee4f1632d"},
@ -861,29 +861,24 @@ markupsafe = [
{file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"},
{file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"},
{file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"},
{file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"},
{file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"},
{file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"},
{file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"},
{file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"},
{file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"},
]
orjson = [
{file = "orjson-2.6.5-cp36-cp36m-macosx_10_7_x86_64.whl", hash = "sha256:2b73518e036fcaabc03f88c951350d971493346f55cdc7368c10a13ff62a4f6f"},
{file = "orjson-2.6.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:2f2b6a425b43174ea4a34dcee67e6c07f6df88baaf7098d1f41bf3e9eb996b00"},
{file = "orjson-2.6.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:2a2e5f0dca7203f8779c20c3c0c5246bbeb62d48a72fa81d30fdae6508acb48f"},
{file = "orjson-2.6.5-cp36-none-win_amd64.whl", hash = "sha256:1393d45a08799f5058aa92e480f8da42e06a288af41bfc58fb48b37a66d711d5"},
{file = "orjson-2.6.5-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:dae4c6d25f09069127deb3866c8f22f9b25530df7ac93ae57068b9c10557d106"},
{file = "orjson-2.6.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:b424eab367173bf9d56ef5242371dc1258bf573dcb4517291ec3b1e4e8020abc"},
{file = "orjson-2.6.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b10bda292e91df63c2ced92c0bdd4d74615acaf58b1f3742a19a82e84a1cb4ee"},
{file = "orjson-2.6.5-cp37-none-win_amd64.whl", hash = "sha256:211d03974a2141e1a52fc1c284ffbbf3c37e9d5c6dd9303aa0817158f800092c"},
{file = "orjson-2.6.5-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:411d3823f6b9cbb43a43942f0bc263720ad7c94d0c68d258cfbf76a0f3c0ce0d"},
{file = "orjson-2.6.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:dd9a62914fabe387cc3c8ff50c9ffd6a7009b422cea270c1527d98b87034ed01"},
{file = "orjson-2.6.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:a889288e111dbb36c740911232ccee97c86f25c70e7a666daca94c5b1f70d7f7"},
{file = "orjson-2.6.5-cp38-none-win_amd64.whl", hash = "sha256:c7d64e3452396af7810efe9fcb0a33c269a4b20e569e51ec9d1522ab4b6aa97b"},
{file = "orjson-2.6.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b15831f847ecae767aed19e0365aefb5315a7834410ab6c59e046f0d199e1593"},
{file = "orjson-2.6.5-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:9f817e770cf4cf919cba6950a47f1b19e3c201dc02a2176821c9c63eff41ad86"},
{file = "orjson-2.6.5.tar.gz", hash = "sha256:89c853658e3dab6e553205159c809f84fd8a69886fe0ef7e4e5eeac407254926"},
{file = "orjson-2.6.6-cp36-cp36m-macosx_10_7_x86_64.whl", hash = "sha256:5ec9fd99a5ea2fcd02e603bf45f59537699eed3c8e80931f4046dbeb3c0b04d0"},
{file = "orjson-2.6.6-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:5ce6ec523cc2c86dbe67212ae5457b367cc9e987dbb6c3205ef40d56288c877a"},
{file = "orjson-2.6.6-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:58940fdb556813495c2be8f49243a5909094375a38e70cced9792562141c67a4"},
{file = "orjson-2.6.6-cp36-none-win_amd64.whl", hash = "sha256:bca81abab141089e83aa1bba2c01d5c761ff62c84a46f0358b1287647adcb288"},
{file = "orjson-2.6.6-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:1f4dd2ea6a34061b61fb0933ab5ff7b1f7192a46ee06f322df3783fbda5c9d80"},
{file = "orjson-2.6.6-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:1422b34d7d087e3a13eab823783942fc94a2ba6b8947697a5eb740bfe4325759"},
{file = "orjson-2.6.6-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:a9a9eef9ffd096951a63615c0a28e1d19baefdb05f184479d5a421a94ae9c69b"},
{file = "orjson-2.6.6-cp37-none-win_amd64.whl", hash = "sha256:56c8fec78f3780c3654d794262836497579bbf65a14a170ef004c3d801ff4a54"},
{file = "orjson-2.6.6-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:862ab639ba644e8c287d1a5512d21a4dfb9f8b82611836ab6fdfd9232412890d"},
{file = "orjson-2.6.6-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:2f5b6c6d6c3e3346f93ed7e77cb0c1e917ffa2ef75f584a472e5d455fbfa567e"},
{file = "orjson-2.6.6-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:abdd23e11fa72a38618b64157e4e3c3b7dde1beaf53d3e222dbd531c5809cd06"},
{file = "orjson-2.6.6-cp38-none-win_amd64.whl", hash = "sha256:fd57f3860e23f09ab861674ce56488e4f78ff65ec0bac1ecddb8875135abe3cc"},
{file = "orjson-2.6.6-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:9d6ebb0865f0d99b76330712280129d5f5f7fd4025082bddeaba87873d9e6a19"},
{file = "orjson-2.6.6-cp39-cp39-manylinux2014_x86_64.whl", hash = "sha256:93ab5b6eca95264d1a1c81644e54f4fe2fdadf39907f5856dbf27a6187a49776"},
{file = "orjson-2.6.6.tar.gz", hash = "sha256:910796567d46223a7f4eaea0cc2cb4d3d3adb7a6bccc5ffa8fa2f95b4296d8d9"},
]
passlib = [
{file = "passlib-1.7.2-py2.py3-none-any.whl", hash = "sha256:68c35c98a7968850e17f1b6892720764cc7eed0ef2b7cb3116a89a28e43fe177"},
@ -901,20 +896,23 @@ pycparser = [
{file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"},
]
pydantic = [
{file = "pydantic-1.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:07911aab70f3bc52bb845ce1748569c5e70478ac977e106a150dd9d0465ebf04"},
{file = "pydantic-1.4-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:012c422859bac2e03ab3151ea6624fecf0e249486be7eb8c6ee69c91740c6752"},
{file = "pydantic-1.4-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:61d22d36808087d3184ed6ac0d91dd71c533b66addb02e4a9930e1e30833202f"},
{file = "pydantic-1.4-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:f863456d3d4bf817f2e5248553dee3974c5dc796f48e6ddb599383570f4215ac"},
{file = "pydantic-1.4-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:bbbed364376f4a0aebb9ea452ff7968b306499a9e74f4db69b28ff2cd4043a11"},
{file = "pydantic-1.4-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e27559cedbd7f59d2375bfd6eea29a330ea1a5b0589c34d6b4e0d7bec6027bbf"},
{file = "pydantic-1.4-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:50e4e948892a6815649ad5a9a9379ad1e5f090f17842ac206535dfaed75c6f2f"},
{file = "pydantic-1.4-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:8848b4eb458469739126e4c1a202d723dd092e087f8dbe3104371335f87ba5df"},
{file = "pydantic-1.4-cp38-cp38-manylinux1_i686.whl", hash = "sha256:831a0265a9e3933b3d0f04d1a81bba543bafbe4119c183ff2771871db70524ab"},
{file = "pydantic-1.4-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:47b8db7024ba3d46c3d4768535e1cf87b6c8cf92ccd81e76f4e1cb8ee47688b3"},
{file = "pydantic-1.4-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:51f11c8bbf794a68086540da099aae4a9107447c7a9d63151edbb7d50110cf21"},
{file = "pydantic-1.4-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:6100d7862371115c40be55cc4b8d766a74b1d0dbaf99dbfe72bb4bac0faf89ed"},
{file = "pydantic-1.4-py36.py37.py38-none-any.whl", hash = "sha256:72184c1421103cca128300120f8f1185fb42a9ea73a1c9845b1c53db8c026a7d"},
{file = "pydantic-1.4.tar.gz", hash = "sha256:f17ec336e64d4583311249fb179528e9a2c27c8a2eaf590ec6ec2c6dece7cb3f"},
{file = "pydantic-1.5.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:2a6904e9f18dea58f76f16b95cba6a2f20b72d787abd84ecd67ebc526e61dce6"},
{file = "pydantic-1.5.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:da8099fca5ee339d5572cfa8af12cf0856ae993406f0b1eb9bb38c8a660e7416"},
{file = "pydantic-1.5.1-cp36-cp36m-manylinux2014_i686.whl", hash = "sha256:68dece67bff2b3a5cc188258e46b49f676a722304f1c6148ae08e9291e284d98"},
{file = "pydantic-1.5.1-cp36-cp36m-manylinux2014_x86_64.whl", hash = "sha256:ab863853cb502480b118187d670f753be65ec144e1654924bec33d63bc8b3ce2"},
{file = "pydantic-1.5.1-cp36-cp36m-win_amd64.whl", hash = "sha256:2007eb062ed0e57875ce8ead12760a6e44bf5836e6a1a7ea81d71eeecf3ede0f"},
{file = "pydantic-1.5.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:20a15a303ce1e4d831b4e79c17a4a29cb6740b12524f5bba3ea363bff65732bc"},
{file = "pydantic-1.5.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:473101121b1bd454c8effc9fe66d54812fdc128184d9015c5aaa0d4e58a6d338"},
{file = "pydantic-1.5.1-cp37-cp37m-manylinux2014_i686.whl", hash = "sha256:9be755919258d5d168aeffbe913ed6e8bd562e018df7724b68cabdee3371e331"},
{file = "pydantic-1.5.1-cp37-cp37m-manylinux2014_x86_64.whl", hash = "sha256:b96ce81c4b5ca62ab81181212edfd057beaa41411cd9700fbcb48a6ba6564b4e"},
{file = "pydantic-1.5.1-cp37-cp37m-win_amd64.whl", hash = "sha256:93b9f265329d9827f39f0fca68f5d72cc8321881cdc519a1304fa73b9f8a75bd"},
{file = "pydantic-1.5.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:e2c753d355126ddd1eefeb167fa61c7037ecd30b98e7ebecdc0d1da463b4ea09"},
{file = "pydantic-1.5.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:8433dbb87246c0f562af75d00fa80155b74e4f6924b0db6a2078a3cd2f11c6c4"},
{file = "pydantic-1.5.1-cp38-cp38-manylinux2014_i686.whl", hash = "sha256:0a1cdf24e567d42dc762d3fed399bd211a13db2e8462af9dfa93b34c41648efb"},
{file = "pydantic-1.5.1-cp38-cp38-manylinux2014_x86_64.whl", hash = "sha256:8be325fc9da897029ee48d1b5e40df817d97fe969f3ac3fd2434ba7e198c55d5"},
{file = "pydantic-1.5.1-cp38-cp38-win_amd64.whl", hash = "sha256:3714a4056f5bdbecf3a41e0706ec9b228c9513eee2ad884dc2c568c4dfa540e9"},
{file = "pydantic-1.5.1-py36.py37.py38-none-any.whl", hash = "sha256:70f27d2f0268f490fe3de0a9b6fca7b7492b8fd6623f9fecd25b221ebee385e3"},
{file = "pydantic-1.5.1.tar.gz", hash = "sha256:f0018613c7a0d19df3240c2a913849786f21b6539b9f23d85ce4067489dfacfa"},
]
pyjwt = [
{file = "PyJWT-1.7.1-py2.py3-none-any.whl", hash = "sha256:5c6eca3c2940464d106b99ba83b00c6add741c9becaec087fb7ccdefea71350e"},
@ -925,11 +923,11 @@ pymysql = [
{file = "PyMySQL-0.9.2.tar.gz", hash = "sha256:9ec760cbb251c158c19d6c88c17ca00a8632bac713890e465b2be01fdc30713f"},
]
pypika = [
{file = "PyPika-0.36.3.tar.gz", hash = "sha256:4fd6455955faa9d9016c2e39281a4808f82bbcf6065726f2c73e923a9e32b1bc"},
{file = "PyPika-0.37.1.tar.gz", hash = "sha256:e2939312e3c209dd388281f973e7470b6969fdb332c85d4bf5b98923879b2d5f"},
]
python-dotenv = [
{file = "python-dotenv-0.12.0.tar.gz", hash = "sha256:92b3123fb2d58a284f76cc92bfe4ee6c502c32ded73e8b051c4f6afc8b6751ed"},
{file = "python_dotenv-0.12.0-py2.py3-none-any.whl", hash = "sha256:81822227f771e0cab235a2939f0f265954ac4763cafd806d845801c863bf372f"},
{file = "python-dotenv-0.13.0.tar.gz", hash = "sha256:3b9909bc96b0edc6b01586e1eed05e71174ef4e04c71da5786370cebea53ad74"},
{file = "python_dotenv-0.13.0-py2.py3-none-any.whl", hash = "sha256:25c0ff1a3e12f4bde8d592cc254ab075cfe734fc5dd989036716fd17ee7e5ec7"},
]
python-multipart = [
{file = "python-multipart-0.0.5.tar.gz", hash = "sha256:f7bb5f611fc600d15fa47b3974c8aa16e93724513b49b5f95c81e6624c83fa43"},
@ -1019,8 +1017,8 @@ ujson = [
{file = "ujson-2.0.3.tar.gz", hash = "sha256:bd2deffc983827510e5145fb66e4cc0f577480c62fe0b4882139f8f7d27ae9a3"},
]
urllib3 = [
{file = "urllib3-1.25.8-py2.py3-none-any.whl", hash = "sha256:2f3db8b19923a873b3e5256dc9c2dedfa883e33d87c690d9c7913e1f40673cdc"},
{file = "urllib3-1.25.8.tar.gz", hash = "sha256:87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc"},
{file = "urllib3-1.25.9-py2.py3-none-any.whl", hash = "sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115"},
{file = "urllib3-1.25.9.tar.gz", hash = "sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527"},
]
uvicorn = [
{file = "uvicorn-0.11.3-py3-none-any.whl", hash = "sha256:0f58170165c4495f563d8224b2f415a0829af0412baa034d6f777904613087fd"},

View File

@ -6,7 +6,7 @@ authors = ["long2ice <long2ice@prismslight.com>"]
[tool.poetry.dependencies]
python = "^3.8"
tortoise-orm = {git = "https://github.com/long2ice/tortoise-orm.git", branch = "long2ice"}
tortoise-orm = {git = "https://github.com/tortoise/tortoise-orm.git", branch = "develop"}
aiomysql = "*"
python-dotenv = "*"
uvloop = "*"

View File

@ -11,7 +11,7 @@ chardet==3.0.4
ciso8601==2.1.3; sys_platform != "win32" and implementation_name == "cpython"
click==7.1.1
colorama==0.4.3
cryptography==2.9
cryptography==2.9.2
dnspython==1.16.0
email-validator==1.0.5
fastapi==0.54.1
@ -25,15 +25,16 @@ iso8601==0.1.12; sys_platform == "win32" or implementation_name != "cpython"
itsdangerous==1.1.0
jinja2==2.11.2
markupsafe==1.1.1
orjson==2.6.6
passlib==1.7.2
promise==2.3
prompt-toolkit==3.0.5
pycparser==2.20
pydantic==1.4
pydantic==1.5.1
pyjwt==1.7.1
pymysql==0.9.2
pypika==0.36.3
python-dotenv==0.12.0
pypika==0.37.1
python-dotenv==0.13.0
python-multipart==0.0.5
python-rapidjson==0.9.1
pyyaml==5.3.1
@ -41,9 +42,10 @@ requests==2.23.0
rx==1.6.1
six==1.14.0
starlette==0.13.2
-e git+https://github.com/tortoise/tortoise-orm.git@0b2c1dced0f036880f0e6cd6c3092ebd24c5674a#egg=tortoise-orm
typing-extensions==3.7.4.2
ujson==2.0.3
urllib3==1.25.8
urllib3==1.25.9
uvicorn==0.11.3
uvloop==0.14.0
wcwidth==0.1.9