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

January 16, 2018 371 views
Apache Django Ubuntu

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
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', '']

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.

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...
Have another answer? Share your knowledge.