django-read-only-admin is a django reusable application that fully implement read only admin
Contents
Add "read_only_admin" to settings.INSTALLED_APPS.
INSTALLED_APPS += ( "read_only_admin", )
Run ./manage.py migrate for django modern versions (>= 1.7) or ./manage.py syncdb for legacy django versions (< 1.7). Then add user/group change/delete/add/readonly model permissions.
Just inherit your custom django admin class from read_only_admin.admin.ReadonlyAdmin.
For example:
from read_only_admin.admin import ReadonlyAdmin class MyCustomAdmin(ReadonlyAdmin): pass
Also tabular and stacked inlines are supported.
For example:
from read_only_admin.admin import ( ReadonlyStackedInline, ReadonlyTabularInline, ) class MyCustomTabularInline(ReadonlyTabularInline): model = MyModel extra = 0 class MyCustomStackedInline(ReadonlyStackedInline): model = MyModel extra = 0
If you use list_editable in your custom admin classes, copy read_only_admin/templates/admin/pagination.html to your project templates/admin directory.
django-read-only-admin uses the MIT license. Please check the MIT-LICENSE file for more details.
Some part of code fairly stolen from teh internets with reference to source. So, if you author of this code, please contact me.
Project Website: https://github.com/vint21h/django-read-only-admin/
Author: Alexei Andrushievich <vint21h@vint21h.pp.ua>
For other authors list see AUTHORS file.