0

I have a Django project which I got from the previous developer and I am in the process of setting up my local test environment. I can successfully get manage.py run server working without any errors, but unable to access 127.0.0.1:8000 or localhost:8000. I am getting error 'This 127.0.0.1 page can’t be found'. In my research about the issue I doubt the issue is with my manage.py or settings. How to fix this. Please help. The below is my manage.py file.

import os
import sys
import django

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Project.settings")
    try:
        from django.core.management import execute_from_command_line
    except ImportError:
        # The above import may fail for some other reason. Ensure that the
        # issue is really that Django is missing to avoid masking other
        # exceptions on Python 2.
        try:
            import django
        except ImportError:
            raise ImportError(
                "Couldn't import Django. Are you sure it's installed and "
                "available on your PYTHONPATH environment variable? Did you "
                "forget to activate a virtual environment?"
            )
        raise
    execute_from_command_line(sys.argv)
Krish
  • 29
  • 4
  • 1
    Welcome to SO! In order to post a question you should bring a minimum information as a input sample and expected output sample (if needed), what did you try and your research, in order to show some effort. What about your settings? – David García Bodego Dec 04 '19 at 05:56
  • I'll second what David García Bodego said. Also, what URL are you hitting in the browser (or preferrably) curl that gives you that error? where is that error coming from? – matb Dec 04 '19 at 06:09

0 Answers0