3👍
✅
Django’s built-in functions may help:
from django.forms.models import fields_for_model
...
fields = fields_for_model(UserInfo).keys()
returns
['concerning', 'title', 'first_name', ...]
Source:stackexchange.com