ariga / djangoviz

Visualize DjangoViz schemas with beautiful ERDs on atlasgo.cloud
Apache License 2.0
20 stars 0 forks source link

Seems to choke on Postgis backend #13

Open JackAtOmenApps opened 1 year ago

JackAtOmenApps commented 1 year ago

My app uses postgis, and I received the following error when running python manage.py djangoviz:

Traceback (most recent call last):
  File "/app/manage.py", line 31, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.10/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.10/site-packages/djangoviz/management/commands/djangoviz.py", line 115, in handle
    db_driver = _get_db_driver()
  File "/usr/local/lib/python3.10/site-packages/djangoviz/management/commands/djangoviz.py", line 46, in _get_db_driver
    raise ValueError(f"Error reading database driver: {engine}")
ValueError: Error reading database driver: django.contrib.gis.db.backends.postgis

It seems djangoviz.py only allows "MYSQL", "POSTGRESQL", or "SQLITE" as engines, but the postgis backend should essentially behave the same as postgres.

rotemtam commented 1 year ago

Hi @OmenApps

Thanks for trying DjangoViz!

Correct, PostGIS is currently not supported by the Atlas Cloud Playground, which is used by djangoviz to create visualizations. Support for this will be added in the near future

HTH