projectcaluma / caluma

A collaborative form editing service
https://caluma.io/
GNU General Public License v3.0
67 stars 26 forks source link

`django_extensions` is missing in dependencies but imported when following "getting started" guide #1932

Closed zvyn closed 1 year ago

zvyn commented 1 year ago

I followed the guide at https://caluma.gitbook.io/caluma-docs/guides/guide which failed at docker-compose up -d

The guide recommends setting ENV=development which makes django_extensions a requirement

However it is not installed in the Docker container because it's just in the dev-requirements leading to this error message:

caluma_1  | Traceback (most recent call last):
caluma_1  |   File "manage.py", line 12, in <module>
caluma_1  |     execute_from_command_line(sys.argv)
caluma_1  |   File "/home/caluma/.cache/pypoetry/virtualenvs/caluma-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
caluma_1  |     utility.execute()
caluma_1  |   File "/home/caluma/.cache/pypoetry/virtualenvs/caluma-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
caluma_1  |     django.setup()
caluma_1  |   File "/home/caluma/.cache/pypoetry/virtualenvs/caluma-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
caluma_1  |     apps.populate(settings.INSTALLED_APPS)
caluma_1  |   File "/home/caluma/.cache/pypoetry/virtualenvs/caluma-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/apps/registry.py", line 91, in populate
caluma_1  |     app_config = AppConfig.create(entry)
caluma_1  |   File "/home/caluma/.cache/pypoetry/virtualenvs/caluma-9TtSrW0h-py3.8/lib/python3.8/site-packages/django/apps/config.py", line 224, in create
caluma_1  |     import_module(entry)
caluma_1  |   File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
caluma_1  |     return _bootstrap._gcd_import(name[level:], package, level)
caluma_1  |   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
caluma_1  |   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
caluma_1  |   File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
caluma_1  | ModuleNotFoundError: No module named 'django_extensions'

(A different issue that can be resolved by reading the logs is that the database server does not start without setting a password.)

winged commented 1 year ago

for ENV=development, you will need to build the container yourself, because it will pull in some additional dependencies, like django-extensions. When you build it locally, the dev dependencies will be installed

After this, you should be able to just run docker-compose build caluma, then start as usual. I'll make a note to improve the docs a bit

czosel commented 1 year ago

Hi @zvyn, we also made an update to the docs that should fix the issue with the database password: https://caluma.gitbook.io/caluma-docs/guides/guide

The problem with django-extensions should be resolved once PR #1934 has been released. Feel free to reopen the issue in case the fixes don't solve the problem for you!

zvyn commented 1 year ago

Thanks a lot for the quick response and resolution! I already got it working with building the image locally