Cookiecutter created a directory giving me problems with a running development server and python shell

I created a django project using a cookiecutter as recommended by the two Django 1.8 scoops. It's called icecreamratings_project. I use the git cmd prompt and use

'cd icecreamratings_project'.

When I want to use the python built-in interpreter using python manage.py it gives me the following error. File "C: \ Users \ Armando \ Desktop \ icecreamratings_project \ config \ settings \ common.py", line 13, in import environ ImportError: there is no module named "environ"

I looked through the directory and the following code:

from __future__ import absolute_import, unicode_literals from sys import path import environ ROOT_DIR = environ.Path(__file__) - 3 # (/a/b/myfile.py - 3 = /) APPS_DIR = ROOT_DIR.path('twoscoops_project') env = environ.Env() 

There is no module named environ, but I assume that the environment refers to a virtual environment. I am not familiar with the cookiecutter documentation or how it creates django templates, but I created a virtual environment called environment.

The message I received after this is that there is no path in the environment. Can anyone help?

+7
git python django shell cookiecutter
source share
1 answer

The environ module can be found in django-environ .

django-environ is a cookiecutter-django requirements/base.txt .

base.txt is a cookiecutter-django requirements/local.txt .

You seem to install environ and other necessary modules by following these steps from cookiecutter-django README.rst :

Turn on and start

The above steps will help you work with local development Environment. Suppose you have the following installed:

  • Pip
  • virtualenv
  • PostgreSQL

First make sure that you have created and activated virtualenv, then open the terminal in the root of the project and set the requirements for local development:

 $ pip install -r requirements/local.txt 

Source: https://github.com/pydanny/cookiecutter-django#getting-up-and-running

+9
source share

All Articles