This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Display Django basic permissions (add, change & delete) in a tabular format that is user friendly, translatable and easy customized. If you have more customised permissions, the default FilteredSelectMultiple widget will also appear to handle those permissions.

Scroll down for some screen shots.

Features:

  • Permissions are displayed in the active language with app and model verbose_name.
  • Any extra custom permissions are displayed in the default admin widget for permissions.
  • Customize which apps, models to show in the permissions table. You can also set a exclude function for high-end customization.
  • RTL ready, Bootstrap ready.
  • Easy customize-able look.
  • Tested on Django 1.8 & Django 1.9.
  • Tested on Python 2.7, 3.4 & 3.5

Installation

You can install django-tabular-permissions via Pypi:

pip install django-tabular-permissions

Usage:

Simply add “tabular_permissions” to your INSTALLED_APPS setting like this:

INSTALLED_APPS = [
    ...
    'tabular_permissions',
]

then navigate to User and/or Group change form to see django-tabular-permissions in action.

Settings:

  • TABULAR_PERMISSIONS_EXCLUDE

Control which apps, models to show in the permissions table. By default tabular_permissions exclude contrib apps sessions , contenttypes and admin apps from showing their models in the permissions table. You can add (or override) those apps and/or specify models to exclude, like this:

TABULAR_PERMISSIONS_EXCLUDE = {
    'app': [],
    'model': [],
    'function': 'tabular_permissions.helpers.TabularPermissionDefaultExcludeFunction',
                 # A dotted path to a class that implement ``__call__`` that takes model as an argument.
    'override': False # Set to True to override default behavior.
}
  • TABULAR_PERMISSIONS_AUTO_IMPLEMENT

By default, just by including tabular_permissions in your installed_apps, the django.contrib.admin.UserAdmin (and GroupAdmin) are “patched” to include the tabular_permissions widget. If you have a custom UserAdmin, then set this option to False and make sure you either:

  1. Inherit from TabularPermissionsUserAdmin for User admin and from“TabularPermissionsGroupAdmin“ for group admin
  2. Inherit from UserTabularPermissionsAdminBase and GroupTabularPermissionsAdminBase before admin.ModelAdmin or UserAdmin/GroupAdmin,
  3. Set the user_permissions widget to tabular_permissions.widgets.TabularPermissionsWidget and remember to send a 3rd argument ‘permissions’ when in Group admin. See tabular_permissions.admin for information.
  • TABULAR_PERMISSIONS_TEMPLATE

Default to ‘tabular_permissions/admin/tabular_permissions.html`. You can either extend or override this template for maximum control.

  • TABULAR_PERMISSIONS_USE_FOR_CONCRETE

Default True. Till now (Feb 1 2016 - django 1.9), there is an inconsistency with proxy models permissions (ticket 11154) So in case you have proxy models and you create their permissions by hand (via this gist maybe) Turn off this option in order to correctly assign your newly created permissions via django-tabular-permissions widget.

JavaScript:

Located at ‘static/tabular_permissions/tabular_permissions.js’, it have 3 responsibilities:

  1. Upon form submit, the checked permissions in the table are dynamically appended to the form default permission input so the backend can carry on its functionality normally and correctly.
  2. Add handlers for column and row select-all checkboxes.
  3. Add a class ‘related-widget-wrapper-user-permissions’ to the div.related-widget-wrapper that contains the table, it serves when you need to manipulate the table container.

Screenshots:

Basic Demo

With Custom permission behaviour

RTL and localized


Enjoy and feel free to report any bugs or make pull requests.

Release History

Release History

1.0.8

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-tabular-permissions-1.0.8.tar.gz (8.8 kB) Copy SHA256 Checksum SHA256 Source Feb 1, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting