Skip to main content

hide fields in django admin

Project description

Provides a field base class to hide fields in django admin. The class turns a field label in an admin edit form into a show/hide toggle link.

Tested with Django 1.11.


  • pip install django-hidefield
  • place 'hidefield' in INSTALLED_APPS


Build a custom field class for any model field type you want to hide. The field has an additional argument hide with the following meaning:

  • 'closed' : default, the field is hidden at start
  • 'data' : the field is hidden at start, if the field contains data
  • 'no-data' : the field is hidden at start, if the field contains no data
  • 'opened' : (or any other value) the field is shown at start


from django.db import models
from hidefield.fields import HideField

class HideCharField(HideField, models.CharField):

class MyModel(models.Model):
    name = HideCharField(max_length=32, hide='data')

See exampleapp for more examples.

Project details

Download files

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

Files for django-hidefield, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size django-hidefield-0.1.2.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page