About Getting the List of All Fields of a Model
When you have models with inheritance and a lot of fields, it might be annoying to collect a list of all fields manually for admin configurations, model forms, and serializers.
Here is a quick way to list all model fields in Django shell for copying and pasting:
>>> [f.name for f in MyModel._meta.fields]
Tips and Tricks Development Django 4.2 Django 3.2 Django 2.2
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.