Given a Django model, I m trying to list all of its fields. I ve seen some examples of doing this using the _meta model attribute, but doesn t the underscore in front of meta indicate that the _meta attribute is a private attribute and shouldn t be accessed directly? ... Because, for example, the layout of _meta could change in the future and not be a stable API?
Is _meta an exception to this rule? Is it stable and ready to use or is it considered bad practice to access it? Or is there a function or some other way to introspect the fields of a model without using the _meta attribute? Below is a list of some links showing how to do this using the _meta attribute
Any advice is much appreciated.