I am trying to get the names of the classes I defined in my models.py file. The closest I could get is to recover all the models in the application:
modelsList = django.apps.apps.get_models (include_auto_created=False)`
which gives:
<class 'django.contrib.admin.models.LogEntry'>
<class 'django.contrib.auth.models.Permission'>
<class 'django.contrib.auth.models.Group'>
<class 'django.contrib.auth.models.User'>
<class 'django.contrib.contenttypes.models.ContentType'>
<class 'django.contrib.sessions.models.Session'>
<class 'app.models.Project'>
<class 'app.models.User'>
<class 'app.models.File'>
But I wanted only the string 'Project', 'User', 'File'. Is there anyway I can get that?