M
M
MSU_cat2017-09-30 17:49:59
JavaScript
MSU_cat, 2017-09-30 17:49:59

What is the right way to run a ready-made django site on a local machine?

There is a ready-made working site, written in django. I need to run it on a local server. To do this, I created a new virtualenv, installed django there, copied the folder from the hosting.
Then I installed pip and executed
pip install -r requirements.txt
Further, as far as I understand, I need to change something in settings.py
When I run a
python manage.py runserver
bunch of errors come out

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/alexandra/example/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
    utility.execute()
  File "/home/alexandra/example/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 308, in execute
    settings.INSTALLED_APPS
  File "/home/alexandra/example/local/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
    self._setup(name)
  File "/home/alexandra/example/local/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/alexandra/example/local/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named firstapp.settings

I just started programming with django. I will be glad for any answer

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Isagadji, 2019-06-20
@zhukov_sky

The server is configured incorrectly. Both of these addresses are hosted by the same server. And most likely, by going to the site www.zgfestival.ru you find yourself in the directory of the site chekhov.ru and there a redirect to HTTPS is configured.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question