How can I create a fully hidden field (input and label) in the admin site?
I know about the exclude
property, but it fully excludes the field from the template,
I found it quite handy to use the 'classes' attribute in fieldsets to hide fields but still leave them in a request. In your model admin you can write
fieldsets = [
('Visible Fields',
{'fields': [('name', 'comment'),]}),
('Collapsable Fields',
{'fields': [('rare_property',)],'classes': ['collapse']}),
('Hidden Fields',
{'fields': [('magic_property',)],'classes': ['hidden']}),
]