idpass / idpass-card-generator

Automate creating of multiple IDs, badges and cards for different people. Just upload your template and start generating your cards with different information.
Apache License 2.0
1 stars 1 forks source link

Production:ModuleNotFoundError: No module named 'debug_toolbar' #65

Open NagarjunaKuchi opened 1 year ago

NagarjunaKuchi commented 1 year ago

We are installing the app in the production. While installing we are getting the following error. But in the production.yml there is no app for debug_toolbar.

django config in .envs/.production/.django

General

------------------------------------------------------------------------------

USE_DOCKER=yes IPYTHONDIR=/app/.ipython

Any thing am i missing here. Below is the complete error stack. new to python ```

idpass-card-generator-django-1 | Traceback (most recent call last): idpass-card-generator-django-1 | File "/app/manage.py", line 31, in idpass-card-generator-django-1 | execute_from_command_line(sys.argv) idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 446, in execute_from_command_line idpass-card-generator-django-1 | utility.execute() idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/core/management/init.py", line 420, in execute idpass-card-generator-django-1 | django.setup() idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/init.py", line 24, in setup idpass-card-generator-django-1 | apps.populate(settings.INSTALLED_APPS) idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/apps/registry.py", line 91, in populate idpass-card-generator-django-1 | app_config = AppConfig.create(entry) idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/site-packages/django/apps/config.py", line 193, in create idpass-card-generator-django-1 | import_module(entry) idpass-card-generator-django-1 | File "/usr/local/lib/python3.9/importlib/init.py", line 127, in import_module idpass-card-generator-django-1 | return _bootstrap._gcd_import(name[level:], package, level) idpass-card-generator-django-1 | File "", line 1030, in _gcd_import idpass-card-generator-django-1 | File "", line 1007, in _find_and_load idpass-card-generator-django-1 | File "", line 984, in _find_and_load_unlocked idpass-card-generator-django-1 | ModuleNotFoundError: No module named 'debug_toolbar'

renceInbox commented 1 year ago

Hello @NagarjunaKuchi , please try adding DJANGO_SETTINGS_MODULE=config.settings.production to .envs/.production/.django

renceInbox commented 1 year ago

Sample production envs

# General
# ------------------------------------------------------------------------------
USE_DOCKER=yes
IPYTHONDIR=/app/.ipython
DJANGO_SETTINGS_MODULE=config.settings.production

# Change this
DJANGO_SECRET_KEY=secret
REDIS_URL=redis://redis/0
DJANGO_ADMIN_URL=admin
SENTRY_DSN=
DJANGO_ALLOWED_HOSTS=your.host.com
Nagarjunakuchi88 commented 1 year ago

Thank you @renceInbox. We are able to deploy now.

jeremi commented 1 year ago

@renceInbox can you add it to the doc if it is not there and close this issue ?