Skip to main content

Really full Django read only admin implementation

Project description

GitHub Coveralls License Version Supported Python version Supported Django version Package format Python wheel support Package status

django-read-only-admin is a Django reusable application that fully implement read only admin


  • Obtain your copy of source code from the git repository: $ git clone Or download the latest release from

  • Run $ python ./ install from the repository source tree or the unpacked archive. Or use pip: $ pip install django-read-only-admin.


  • Add "read_only_admin" to settings.INSTALLED_APPS.


  • Run $ python ./ migrate.

  • Then add user/group change/delete/add/readonly model permissions.



Read-only permission prefix. Defaults to: "readonly".


Read-only permission name prefix. Defaults to: "Read only".


Empty admin actions list (exclude superusers) or just remove delete selected action. Defaults to: True.


Just inherit your custom Django admin class from read_only_admin.admin.ReadonlyAdmin.


from read_only_admin.admin import ReadonlyAdmin

class MyCustomAdmin(ReadonlyAdmin):


Also tabular and stacked inlines are supported.


from read_only_admin.admin import (

class MyCustomTabularInline(ReadonlyTabularInline):

    model: Type[Model] = MyModel
    extra: int = 0

class MyCustomStackedInline(ReadonlyStackedInline):

    model: Type[Model] = MyModel
    extra: int = 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.


  1. Fork it

  2. Install GNU Make

  3. Install and configure pyenv and pyenv-virtualenv plugin

  4. Install and configure direnv

  5. Create environment config from example

cp .env.example .env
  1. Install development dependencies:

make install
  1. Create your fix/feature branch:

git checkout -b my-new-fix-or-feature
  1. Check code style and moreover:

make check
  1. Run tests:

make test
  1. Push to the branch:

git push origin my-new-fix-or-feature
  1. Create a new Pull Request


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 the source. So, if you author of this code, please contact me.


Project Website:

Author: Alexei Andrushievich <>

For other authors list see AUTHORS file.

Project details

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution (28.6 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page