[Fixed]-How to make an admin panel to review the entries per field in Django?

1👍

If I got you right, your particular question is about constructing a form with checkboxes for all the model’s fields. Here’s the way to do it:

class ReviewForm(forms.Form):
    def __init__(self, model, *args, **kwargs):
        super(ReviewForm, self).__init__(self, *args, **kwargs)
        for field in model._meta.get_fields():
            self.fields[field.name] = forms.BooleanField(label=field.name, initial=True)


def triage_view(request, *args, **kwargs):
    form = ReviewForm(Entry, data=request.POST or None) 
    # do stuff with that form, for example
    accepted_field_names = [key for key, val in form.cleaned_data if val]

Leave a comment