tutorialdb icon indicating copy to clipboard operation
tutorialdb copied to clipboard

LOCAL_HOST is not optional

Open ObliviousParadigm opened this issue 5 years ago • 1 comments

Is your feature request related to a problem? Please describe. The README.md file specifies that adding LOCAL_HOST is optional but I am facing an issue on my desktop. I can't run the code without adding localhost.

Describe the solution you'd like I have fixed this issue. I have already sent a PR. #95

ObliviousParadigm avatar Jun 14 '20 14:06 ObliviousParadigm

This could be fixed by using os.getenv i.e.

import os

ALLOWED_HOSTS = [
    '127.0.0.1',
    'tutorialdb.pythonanywhere.com',
    'tutorialdb-app.herokuapp.com'
    'tutorialdb-app.herokuapp.com',
]

LOCAL_HOST = os.getenv('LOCAL_HOST')

if LOCAL_HOST:
    ALLOWED_HOSTS.append(LOCAL_HOST)

kalumewakitsao avatar Sep 13 '21 15:09 kalumewakitsao