django-fsm
django-fsm copied to clipboard
graph_transitions throwing error
On Django 1.10.7, I get this when I try to generate a state transition diagram:
python_user@5db50b80be4b:/app$ python manage.py graph_transitions -o REDACTED/apps/profiles/state_transitions.png profiles
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/python_user/.pyenv/versions/3.6.1/lib/python3.6/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/home/python_user/.pyenv/versions/3.6.1/lib/python3.6/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/python_user/.pyenv/versions/3.6.1/lib/python3.6/site-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/python_user/.pyenv/versions/3.6.1/lib/python3.6/site-packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/home/python_user/.pyenv/versions/3.6.1/lib/python3.6/site-packages/django_fsm/management/commands/graph_transitions.py", line 160, in handle
app = apps.get_app(field_spec[0])
AttributeError: 'Apps' object has no attribute 'get_app'
+1, having the same issue.
Temporary fix in graph_transitions.py: #app = apps.get_app(field_spec[0]) #models = apps.get_models(app) app = apps.get_app_config(field_spec[0]) models = app.models.values()
Sounds like that'd be a pretty easy patch/PR -- any downsides you know of @wrvdklooster if it were done in a backwards compatible way?
Still getting this
Closing since the graph generation was reworded since the issue was raised