Django Edit or Delete Permission

  • Posted on: 18 April 2016
  • By: oon
Django Edit or Delete Permission

If you add Permission in Django via Meta or programatically [1], then you realized that you need to edit or even delete the permission.

How to edit or delete Permissions?

If you are really sure you want to edit or delete it with any risk, you can add Permission to your admin page. [2]

from django.contrib.auth.models import Permission
admin.site.register(Permission)

and of course you should change (or delete it) first on your model or code.

[1]https://docs.djangoproject.com/en/1.8/topics/auth/customizing/#custom-pe...
[2]https://stackoverflow.com/a/17861028/3991504

 

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.