good morning,
I have a problem with a django app deployed as a web app on Microsoft Azure.
Basically after adding an imageField to a model, when from administration I enter in the modification of one of those objects (related to that model) I get the following error:
No module named 'backend'
Request Method: GET Request URL: http://......myurl...../adminforsuperuser/auth/tenants/tenant/4791c751-bc04-4bb5-aa9f-82732b7c3217/change/ Django Version: 2.2.8 Exception Type: ModuleNotFoundError Exception Value:
No module named 'backend'
Exception Location: in _find_and_load_unlocked, line 953 Python Executable: /opt/python/3.6.12/bin/python3.6 Python Version: 3.6.12 Python Path:
['/opt/python/3.6.12/bin', '/tmp/8d942cfe6a508ea', '/tmp/8d942cfe6a508ea/antenv3.6/lib/python3.6/site-packages', '/opt/python/3.6.12/lib/python36.zip', '/opt/python/3.6.12/lib/python3.6', '/opt/python/3.6.12/lib/python3.6/lib-dynload', '/opt/python/3.6.12/lib/python3.6/site-packages']
Server time: Fri, 9 Jul 2021 12:04:19 +0000
More details about the error: image
The field I add to the model:
logo= models.ImageField(upload_to=path_and_rename, default='tenant_logos/default_logo.png')
Practically the fact that in edit must also show me the form to change the image (and the path of the image currently saved in that object) breaks the whole page.
The strange thing is that it works locally! They, local and prod, have the same apps installed:
INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'crispy_forms', .....my app here... , ]
Thank you!