首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > Django的细粒度的权限允许您设置每列的权限。

Django的细粒度的权限允许您设置每列的权限。

  • 资源大小:3.45 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: python django Permissions crud granular

资 源 简 介

Django Granular Permissions allow you to setup per-row permissions. ver 0.2 adds NewForms-Admin support. This project is injecting new methods into Django"s auth.User and auth.Group in a non-invasive way (doesn"t require modifying Django"s code). Simple permission checks within views and templates with templatetags. You just simply have to install django-granular-permissions somewhere on your PYTHONPATH and add "django_granular_permissions" to your installed apps and invoke python manage.py syncdb Note: superusers will always have True returned on has\_row\_perm(), also not active users will always get False Example: ``` # adding permission "edit" to a user "Bart" on an instance of a MyObject from myapp.models from django.contrib.auth.models import User, Group from myapp.models import MyObject user = User.objects.get(username="Bart") obj = MyObject() o

文 件 列 表

django-granular-permissions-0.2
PKG-INFO
setup.py
django_granular_permissions
__init__.py
VIP VIP
0.190365s