How do I hide the field label for a HiddenInput widget in Django Admin?

前端 未结 10 1113
谎友^
谎友^ 2020-12-31 02:34

I\'ve got a bit of Django form code that looks like this:

class GalleryAdminForm(forms.ModelForm):
    auto_id=False
    order = forms.CharField(widget=forms         


        
10条回答
  •  滥情空心
    2020-12-31 03:27

    Check the answer at Create a hidden field in the admin site, it can be done without JavaScript by overriding admin/includes/fieldset.html From there, you can inject a CSS class, and do the rest.

提交回复
热议问题