Question

I am deploying Django app. I am trying to run python manage.py evicharya.com:8000 then It is giving me error.

Posted January 16, 2018 5.6k views
Ubuntu Apache Django

When I am running http://My_IP:8000 then it is working perfectly but when I am trying to run python manage.py runserver evicharya.com:8000 then it is showing me an error. I am new to deployment, I am working to solve this thing from last 3 days. Once I would run my domain then how I would run it forever ever if I would close my terminal. I have tried to create the Apache server but when I am not able to do it. Will someone please correct me and help me?

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Without knowing what the error message you’re a seeing, it’s hard to know the exact problem you’re experiencing. The first thing I would check is that your domain is included in the ALLOWED_HOSTS section of your project’s settings.py file. You’ll likely want it to look like:

ALLOWED_HOSTS = [ 'evicharya.com', 'your.ip.address', 'localhost', '127.0.0.1']

See the Django docs for more information.

When you’re ready to set up your project in a more production-like environment (and not have to run it from the terminal directly), take a look at this tutorial. It should point you in the right direction.

by Justin Ellingwood
Django is a powerful web framework that can help you get your Python application or website off the ground. Django includes a simplified development server for testing your code locally, but for anything even slightly production related, a more secure and powerful web server...
Submit an Answer