Coder Social home page Coder Social logo

liqianglog / django-vue-admin Goto Github PK

View Code? Open in Web Editor NEW
674.0 9.0 181.0 35.84 MB

A complete set of basic development platform for permission control based on RBAC model, with front-end and back-end separation, and the back-end using django+django-rest-framework, while the frontend using Vue+ElementUI+d2admin.

Home Page: https://django-vue-admin.com

License: Apache License 2.0

Python 78.23% Vue 18.84% SCSS 2.85% Dockerfile 0.06% Shell 0.03%
python vue django django-rest-framework django-vue-admin d2admin admin element-ui dvadmin

django-vue-admin's Introduction

This project has been archived, please move to a new version dvadmin3: https://github.com/huge-dream/django-vue3-admin

This project has been archived, please move to a new version dvadmin3: https://github.com/huge-dream/django-vue3-admin

This project has been archived, please move to a new version dvadmin3: https://github.com/huge-dream/django-vue3-admin

Django-Vue-Admin

img img PyPI - Django Version badge img img

中文文档 | preview | Official website document | qq group | community | plugins market | Github

💡 「About」

We are a group of young people who love Code. In this hot era, we hope to calm down and bring some of our colors and colors through code.

Because of love, so embrace the future

🗓️ 「Development Roadmap」

Please leave your valuable suggestions for creating a more comprehensive dvadmin Submit Requirements | Roadmap

👩‍👦‍👦 「Essay Competition」

To promote better community development, we are organizing the dvadmin Essay Competition. Exciting prizes, including perpetual commercial licenses, await you. Click here to view the details.

framework introduction

💡 django-vue-admin Is a set of all open source rapid development platform, no reservation for individuals and enterprises free use.

  • 🧑‍🤝‍🧑Front-end adoptionD2AdminVueElementUI
  • 👭The backend uses the Python language Django framework as well as the powerfulDjango REST Framework
  • 👫Permission authentication useDjango REST Framework SimpleJWT,Supports the multi-terminal authentication system.
  • 👬Support loading dynamic permission menu, multi - way easy permission control.
  • 💏 Special thanks:D2AdminVue-Element-Admin
  • 💡 Special thanks:jetbrains To provide a free IntelliJ IDEA license for this open source project.

Online experience

👩‍👧‍👦demo address:http://demo.django-vue-admin.com

  • demo account:superadmin

  • demo password:admin123456

👩‍👦‍👦docs:https://django-vue-admin.com

Communication

core function

  1. 👨‍⚕️ Menu management: Configure the system menu, operation permissions, button permissions, back-end interface permissions, etc.
  2. 🧑‍⚕️ Department management: Configure the system organization (company, department, role).
  3. 👩‍⚕️ Role management: role menu permission allocation, data permission allocation, set roles according to the department for data range permission division.
  4. 🧑‍🎓 Rights Specifies the rights of the authorization role.
  5. 👨‍🎓 User management: The user is the system operator, this function mainly completes the system user configuration.
  6. 👬 Interface whitelist: specifies the interface that does not need permission verification.
  7. 🧑‍🔧 Dictionary management: Maintenance of some fixed data frequently used in the system.
  8. 🧑‍🔧 Regional management: to manage provinces, cities, counties and regions.
  9. 📁 Attachment management: Unified management of all files and pictures on the platform.
  10. 🗓 ️operation logs: log and query the system normal operation; Log and query system exception information.
  11. 🔌 plugins market : based on the Django framework - Vue - Admin application and plug-in development.

source code url:

gitee(Main push):https://gitee.com/liqianglog/django-vue-admin👩‍👦‍👦

github:https://github.com/liqianglog/django-vue-admin👩‍👦‍👦

Project Star Introduction
django-vue-admin Gitee star GitHub stars Management Dashboard based on
Vue2 + Element + D2Admin + Django.
django-vue3-admin Gitee star GitHub stars Management Dashboard implemented based on
Vue3 + vue-next-admin + fastcrud + Django.

plugins market 🔌

Plugin Name Development Status Description
dvadmin3-celery 定时任务 Released Enables asynchronous tasks in dvadmin3, including task scheduling and record management
dvadmin-celery 定时任务 Released Enables asynchronous tasks in dvadmin3, including task scheduling and record management
dvadmin-sms 短信服务 Released Integrates SMS service plugins for various platforms
dvadmin-vform 表单设计器 Released Low-code form designer plugin
dvadmin-tenants 多租户管理 Released Saas mode for multi-tenancy management
dvadmin-third 第三方用户管理 Released Plugin for managing third-party users
dvadmin-ak-sk 加密密钥管理 Released Manages encryption keys for verifying authentication strings
dvadmin-pay 支付插件 Released Payment plugin for dvadmin, supports WeChat Pay and Alipay
dvadmin-uniapp Released Uniapp plugin for dvadmin
dvadmin-cloud-storage 云存储插件 Development Plugin for storing files using various cloud storage providers
dvadmin-es 搜索插件 Development Search plugin for Elasticsearch
dvadmin-low-code-crud 低代码生成 Development Low-code generation plugin
dvadmin-flow 工作流插件 Development Workflow plugin

before start project you need:

Python >= 3.8.0 
nodejs >= 14.0
Mysql >= 5.7.0 (Optional. The default database is sqlite3. 8.0 is recommended)
Redis(Optional, the latest edition)

frontend♝

# clone code
git clone https://gitee.com/liqianglog/django-vue-admin.git

# enter code dir
cd web

# install dependence
npm install --registry=https://registry.npm.taobao.org

# Start service
npm run dev
# Visit http://localhost:8080 in your browser
# Parameters such as boot port can be configured in the #.env.development file
# Build the production environment
# npm run build

backend💈

1. enter code dir cd backend
2. copy ./conf/env.example.py to ./conf dir,rename as env.py
3. in env.py configure database information
 mysql database recommended version: 8.0
 mysql database character set: utf8mb4
4. install pip dependence
 pip3 install -r requirements.txt
5. Execute the migration command:
 python3 manage.py makemigrations
 python3 manage.py migrate
6. Initialization data
 python3 manage.py init
7. Initialize provincial, municipal and county data:
 python3 manage.py init_area
8. start backend
 python3 manage.py runserver 0.0.0.0:8000
or gunicorn :
  gunicorn -c gunicorn_conf.py application.asgi:application

visit backend swagger

  • visit url:http://localhost:8080 (The default address is this one. If you want to change it, follow the configuration file)
  • account:superadmin password:admin123456

docker-compose

docker-compose up -d
# Initialize backend data (first execution only)
docker exec -ti dvadmin-django bash
python manage.py makemigrations 
python manage.py migrate
python manage.py init_area
python manage.py init
exit

frontend url:http://127.0.0.1:8080
backend url:http://127.0.0.1:8080/api
# Change 127.0.0.1 to your own public ip address on the server
account:`superadmin` password:`admin123456`

# docker-compose stop
docker-compose down
#  docker-compose restart
docker-compose restart
#  docker-compose on start build
docker-compose up -d --build

Demo screenshot✅

image-01

image-02

image-03

image-04

image-05

image-06

image-07

image-08

image-09

image-10

image-11

image-12

Commercial License

image-13

django-vue-admin's People

Contributors

ahhuiguys avatar angelo055 avatar chuanwei avatar davidsuperstar avatar h0ngza1 avatar iscopyman avatar lichenliang666 avatar liqianglog avatar littlefenda avatar p8cm avatar qzkrainpig avatar raymond38324 avatar raymond531 avatar timeupdated avatar tylerlog avatar wuhuanyan avatar xt12321 avatar yuanxiaotian666 avatar zhangjinsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-vue-admin's Issues

权限管理无保存按钮

“角色管理”-“权限管理”,无保存按钮,去掉如下代码后按钮才会出现。

web/src/views/system/rolePermission/index.vue第16行:v-permission="'Save'"

分支:2.x

兼容mongodb吗

settings配置文件中导入了mongoengine包,但没找到具体使用。

Page not found(404)

When visit "http://127.0.0.1:8000/", error occurs as the followsing:

Page not found (404)

Request Method: GET
http://127.0.0.1:8000/
------------------------------------------------------------------ Using the URLconf defined in application.urls, Django tried these URL patterns, in this order:

media/(?P.*)
^admin/
The empty path didn't match any of these.

用户登录限制功能增加

是否可以考虑实现限制同时登录系统用户数量限制单个用户同时在不同平台登录数量这种登录限制功能?如果可以提供修改思路也可以,万分感谢!

在oracle12环境下初始化数据出现问题

model中含有json字段时,django会在生成表时添加json的检查约束。system_config表的初始化数据的json字段数据,有几个字段并没有严格按照json格式构建数据,在oracle下会出现违反约束异常(ORA-02290: check constraint (CUSTOMER.SYS_C00218232) violated)

SIMPLE_JWT 刷新token优化

目前的代码REFRESH_TOKEN刷新机制尚未完善,自己摸索了一下,可按以下配置:
token2天过期,到期后使用REFRESH_TOKEN刷新,直到 REFRESH_TOKEN也过期,则必须重新登录。cookie 中配置 expires: 2,2天后过期也必须重新登录,如果cookie被别人拿到,原理上则可以一直刷新token使用14天。建议'ROTATE_REFRESH_TOKENS': False,强制过期。

1.settings.py

SIMPLE_JWT = {
# 认证token有效时长 2天
'ACCESS_TOKEN_LIFETIME': timedelta(days=2),
# 刷新token有效时长 14天,用于ACCESS_TOKEN过期后重新获取
'REFRESH_TOKEN_LIFETIME': timedelta(days=14),
# 设置前缀
'AUTH_HEADER_TYPES': ('JWT',),
# 若为True,则刷新后新的refresh_token有效时间自动延长,客户端可以一直获得新的token,不安全
# 若为False,REFRESH_TOKEN到期即失效
'ROTATE_REFRESH_TOKENS': False,
}

  1. service.js

// 响应拦截
service.interceptors.response.use(
.............略
// 刷新token
case 401:
//目前看msg存在messages则说明是access-token过期
if (dataAxios.msg.code === 'token_not_valid' && dataAxios.msg.messages) {
// 如果access-token过期则使用refresh-token刷新
if (dataAxios.msg.messages[0].token_type === 'access') {
refreshTken().then(res => {
util.cookies.set('token', res.access)
router.go(0)
})
}
} else {
// 如果refresh-token过期则直接退出登录
errorCreate(${getErrorMessage(dataAxios.msg)})
}
// --------------chuanwei-at-2022.4.22--------
break

3.util.cookies.js

cookies.set = function (name = 'default', value = '', cookieSetting = {}) {
const currentCookieSetting = {
expires: 2
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.