mirror of
https://github.com/himool/HimoolERP.git
synced 2026-01-11 03:44:16 +08:00
feat: 权限, 用户, 角色
This commit is contained in:
parent
5068d99c43
commit
8403fb89ea
2 changed files with 19 additions and 0 deletions
|
|
@ -8,6 +8,14 @@ http://127.0.0.1:8000/api/schema/redoc/
|
|||
http://127.0.0.1:8000/api/
|
||||
```
|
||||
|
||||
## 构建
|
||||
|
||||
```
|
||||
python manage.py makemigrations
|
||||
python manage.py migrate
|
||||
python manage.py shell_plus
|
||||
```
|
||||
|
||||
## 启动
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -154,6 +154,17 @@ MEDIA_ROOT = BASE_DIR / 'media'
|
|||
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
|
||||
|
||||
|
||||
# Django REST framework
|
||||
# https://www.django-rest-framework.org/
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DATETIME_FORMAT': "%Y-%m-%d %H:%M:%S",
|
||||
'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend'],
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': ['extensions.authentications.BaseAuthentication'],
|
||||
'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
|
||||
}
|
||||
|
||||
|
||||
# Simple JWT
|
||||
# https://django-rest-framework-simplejwt.readthedocs.io/en/latest/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue