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