get all fields in django model code example Example: django get all model fields def get_model_fields(model): return model._meta.fields