[Fixed]-List fields present in a table

19👍

Profile._meta.fields will get you a list of fields. The name property of the field object contains the name of the field. Profile._meta.get_fields_with_model() will return a list of 2-tuples of (field, model), with model being None if the field is in Profile.

Leave a comment