Last active
January 7, 2019 23:34
-
-
Save driverdan/c745953dd81e0c444b297c5302598d7d to your computer and use it in GitHub Desktop.
List of Django models and attributes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import django.apps | |
for model in django.apps.apps.get_models(): | |
print(model._meta.label) | |
for field in model._meta.get_fields(): | |
print(f" {field.name}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment