not_editable_admin — Camelot documentation

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- admin »

# not_editable_admin

Class decorator to make all fields visualized with the Admin into read-only fields

`camelot.admin.not_editable_admin.` `notEditableAdmin`(original_admin, actions=False, editable_fields=None)

  Turn all fields visualized with original_admin into read only fields :param original_admin: an implementation of ObjectAdmin :param actions: True if the notEditableAdmin should have its actions enabled, default to False :param editable_fields: list of fields that should remain editable

  usage

      class Movie(Entity):
        name = Field(Unicode(50))
        contributions = Field(Unicode(255))

        class Admin(EntityAdmin):
          list_display = ['name', 'contributions]

        Admin = notEditableAdmin(Admin, editable_fields=['contributions'])

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- admin »

Comments
blog comments powered by Disqus