In django, is there a way to loop through each model that is currently in your database?
I would like to be able to have a function that gets the total number of rows in all of my models, per model, without having to the function every time I added a new model.
the output being something like
model1 rows: 23
model2 rows:234
and then if I were to add a new model it would automatically output
model1 rows: 23
model2 rows:234
model3 rows:0
the ideal format would be something like.
def getDbStatus()
for m in Models:
print(m.objects.count)