Django: Add Permission model to admin panel

How to add a permissions model to your Django admin?
You may add those lines to anywhere in your code. But it is more convinient to add this to your admin.py or place where django admin custom code lies. Here are them:
from django.contrib.auth.models import Permission
admin.site.register(Permission)
Now you can manage them in in your Django admin panel. May look like this:
Hope this helps.

Comments

  1. Hi,To put it in simple words, a design should follow these simple rules of basic Web Design Cochin to be qualified as a quality web design. Connects the visitor with the content.thanks.....

    ReplyDelete

Post a Comment

Popular posts from this blog

Django: Resetting Passwords (with internal tools)

Python converting PDF to Image

Django: Beautiful multiple files Upload Plugin using jQuery UI.