update README.rst

This commit is contained in:
long2ice
2020-04-20 15:43:03 +08:00
parent 3941862819
commit 116b02bdea
4 changed files with 6 additions and 7 deletions

View File

@@ -121,7 +121,7 @@ And set ``permission=True`` to active it:
Enum Support
~~~~~~~~~~~~
When you define a enum field of tortoise-orm,like ``IntEnumField``,you can inherit ``fastapi_admin.enum.EnumMixin`` and impl ``choices()`` method,
When you define a enum field of tortoise-orm,like ``IntEnumField``,you can inherit ``fastapi_admin.enums.EnumMixin`` and impl ``choices()`` method,
FastAPI-admin will auto read and display and render a ``select`` widget in front.
.. code-block:: python

View File

@@ -3,7 +3,6 @@ import json
import jwt
from fastapi import Query, Path, Depends, HTTPException
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
from fastapi.security.utils import get_authorization_scheme_param
from pydantic import BaseModel
from starlette.requests import Request
from starlette.status import HTTP_401_UNAUTHORIZED, HTTP_403_FORBIDDEN, HTTP_404_NOT_FOUND

View File

@@ -13,7 +13,7 @@ router = APIRouter()
)
async def home():
return {
'title': "Welcome to REST ADMIN"
'title': "Welcome to FastAPI ADMIN"
}

View File

@@ -1,6 +1,6 @@
import Vue from 'vue'
import axios from 'axios'
import store, { types } from './store'
import store, {types} from './store'
import _ from 'lodash'
const API_URI = process.env.VUE_APP_API_URL || '/admin/api/'
@@ -20,7 +20,7 @@ axios.interceptors.response.use(response => {
return response;
}, ({response}) => {
store.commit(types.STOP_LOADING)
const { data, status, statusText } = response
const {data, status, statusText} = response
switch (status) {
case 422:
@@ -37,7 +37,7 @@ axios.interceptors.response.use(response => {
if (Array.isArray(msg)) {
msg = msg[0].message
}
if (msg) {
Vue.prototype.$snotify.error(String(msg))
} else {
@@ -48,4 +48,4 @@ axios.interceptors.response.use(response => {
Vue.prototype.$http = axios
export default axios
export default axios