Q:

Errno 22 Invalid argument \\:\\ added

I am exporting a django project from a computer that runs Ubutnu to another that runs Windows 10. I've exported the environment with pip install -r requeriments.txt and everything seems to work fine, since, for example, python manage.py migrate is working properly.
The server starts fine with python manage.py runserver, however, when I open the URL http://127.0.0.1:8000/home in my browser I get the following error:

IOError at /home/ [Errno 22] Invalid argument:
  u'C:\Users\myusername\Envs\myenv\myproject\:\HomePage.html'

The views are correctly setup because the project was running OK in ubuntu. The problem seems to be that the HomePage.html, which is supposed to be located in ...\\myproject\\marketingApp\\templates\\HomePage.html, is being looked for in ...\\myproject\\:\\HomePage.html and I don't know how/where to fix that.

A:

I managed to load http://127.0.0.1:8000/home by adding my project folder path 'C:\\Users\\myuser\\Envs\\myenv\\myproject' directly into the TEMPLATES dict:
TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [
                os.path.join(BASE_DIR, 'templates'),
                'C:\\Users\\myuser\\Envs\\myenv\\myproject'
                ],
        'APP_DIRS': True,
        'OPTIONS': {
            'debug':DEBUG,
            'context_processors': [
                'django.template.context_processors.debug',
                'django.template.context_processors.request',
                'django.contrib.auth.context_processors.auth',
                'django.contrib.messages.context_processors.messages',
                "django.core.context_processors.i18n",
                "django.core.context_processors.media",
                "django.core.context_processors.static",
                "django.core.context_processors.tz"
            ],
        },
    },
] 

