Add localhost and 127.0.0.1 to the list of allowed hosts ALLOWED_HOSTSĪll of this is achieved by making the following changes in the config/settings.py file:Ĭreating test database for alias 'default'.Change the DEBUG variable to be taken from the environment also.This prevents tools like GitGardian to complaint about security issues and makes our project more portable Remove the SECRET_KEY value from the settings file, and make it be read from the environment. ![]() Remember config, is the name I chose for my project If you visit you'll get the start Django start screen.īefore we go any further, lets do some cleanup in the config/settings.py file by removing some sensitive data and making Django read the environment for things like keys: A lot of people use the sufix _project, like crm_project or test_project, instead. I like to name my projects config since there is where most of the configuration files will be. This prevent the creation of a new sub-directory. Run the test server in port 8000 (which is the default port). ![]()
0 Comments
Leave a Reply. |