django get all models code example
Example 1: django get all model fields
def get_model_fields(model):
return model._meta.fields
Example 2: create django object
Author.objects.create(name="Joe")
def get_model_fields(model):
return model._meta.fields
Author.objects.create(name="Joe")