Code Monkey home page Code Monkey logo

tianpangji / drf_admin Goto Github PK

View Code? Open in Web Editor NEW
504.0 15.0 150.0 1.08 MB

项目基于Django、Django REST framework(DRF)、Channels、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC;目前已实现基本功能,满足日常学习使用,工由于工作较忙更新较慢,请见谅......https://tianpangji.github.io/

License: MIT License

Python 100.00%
django django-rest-framework rbac swagger channels redis django-easy-audit python drf-admin drf

drf_admin's Issues

object-level / instance-level / row-level 权限控制

看了项目的权限控制这块,我的理解是可以实现model-level的权限控制,请问能实现实例级别或者对象级别(数据库行级别)的权限控制吗?

举例讲,现有的permission可以实现对自定义model的所有实例增删改查的控制; 如果要实现分别将不同实例分配给不同的用户,请问要怎么实现呢?

运行久了后端会报“took too long to shut down and was killed.”错误,导致连接异常

Application instance <Task pending name='Task-25' coro=<AsgiHandler.call() running at D:\iot\django\drf_admin\drf_admin\venv\lib\site-packages\channels\http.py:192> wait_for=<Future pending cb=[_chain_future.._call_che
ck_cancel() at C:\Python310\lib\asyncio\futures.py:385, Task.task_wakeup()]>> for connection <WebRequest at 0x1abf6ef07c0 method=GET uri=/api/oauth/info/ clientproto=HTTP/1.1> took too long to shut down and was killed.

关于用户权限的实现

您好!用户权限RbacPermission类的2点建议:
1、判断权限前几步都是读取数据库,增加了系统负担,最好是全redis操作
2、没有录入后台管控的权限,都是全pass的,容易造成漏洞

错误的代码放上了折腾好久

python manage.py loaddata init.json

port = int(port, 10)
ValueError: Problem installing fixture '/home/admin/workspace/develop-django/tmp/drf_admin/init.json': Could not load system.Permissions(pk=1): invalid literal for int() with base 10: 'redis'
(env3.6.2) [admin@us-cor

联系求助

小老板,留个邮箱或者其他联系方式呀,我想参与这个的开发

ModuleNotFoundError: No module named 'easyaudit'

执行 python manage.py migrate 或者 python manage.py runserver 0.0.0.0:8769 都报错 ,提示 ModuleNotFoundError: No module named 'easyaudit' ,这个模块我网上也没搜到 ,是啥原因呢

【咨询问题】在项目任意文件中调试(debug)变量

您好,我在使用这个项目时遇到了一个可能您认为比较简单的问题,想咨询一下,烦请能解答一下。

问题:
比如我想在drf_admin/apps/oauth/views/home.py文件里打印某变量的内容到console或文件。

除了使用print()函数能打印到console,应该如何编写代码呢?烦请提供一个简单的示例,谢谢!

权限问题

请问现有功能权限可以基本使用了吗?权限表路径设置是对应的vue的组件路径还是drf_admin url的路径,谢谢

感谢开源

MultipleDestroyMixin 这个mixin代码逻辑好像有问题

用户权限问题

您好,可以把权限设计和对应的表设计的实现,列出一个逻辑关系对应吗,谢谢。

依赖包文件版本需更新

The conflict is caused by:
The user requested hyperlink==19.0.0
autobahn 20.12.3 depends on hyperlink>=20.0.1

The conflict is caused by:
The user requested urllib3==1.26.5
requests 2.24.0 depends on urllib3!=1.25.0, !=1.25.1, <1.26 and >=1.21.1

权限问题

问下 这个可以实现,权限不通的用户登陆到后台,所显示的功能也不一样,没太看明白 怎么操作

JobsListCreateAPIView(ListCreateAPIView)类的问题

该类下
def get_serializer_class(self):
if self.request.method.lower() == 'get'
这里self下是没有request属性的,运行报错。
可以修改为
class JobsListCreateViewSet(mixins.ListModelMixin, mixins.CreateModelMixin, GenericViewSet):
def get_serializer_class(self):
if self.action == 'list':
return JobsListSerializer

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.