I am currently working on the CS50 Web course and am focusing on Project 1. For my development environment, I decided to use the online CS50dev IDE because I cannot install Django on my PC due to administrative restrictions.
One of the first tasks in the project is to set up routing for files. For example, if you type server_address/wiki/css, you should be able to view the css page (if it exists); otherwise, an error page should be rendered. However, when I run the server and try to view pages, the error page is always displayed instead of the css page (or any other existing page). I suspect the problem might be related to the storage configuration. When I use the debugger to test my get_entry function, I encounter the following error:
django.core.exceptions.ImproperlyConfigured: Requested setting STORAGES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
Could you please help me figure out this bug? I’ve spent hours researching it, but nothing seems to be working.
I tried to configure the storages but that didn’t help.
Martin Štěpánek is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.