1

I am getting No module named context_processors using django 1.7 due to django-baker requirements

main urls:

from django.conf.urls import patterns, include, url
from django.contrib import admin

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^account/', include('account.urls')),
    url(r'^postings/', include('postings.urls')),
)

settings.py:

"""
Django settings for myproject project.

For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'byq8q@@!vc+!-(my3s0g)_-y4lyhvv@4+u2f-r_)v04m65ogq!'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

TEMPLATE_DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',

    'django_extensions',
    'django_baker',
    'bootstrapform',
    # 'emailusernames',
    'pinax_theme_bootstrap_account',
    'django_forms_bootstrap',

    'account',
    'postings',


)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
    'account.middleware.LocaleMiddleware',
    'account.middleware.TimezoneMiddleware',
)

ROOT_URLCONF = 'myproject.urls'

WSGI_APPLICATION = 'myproject.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/



TEMPLATE_DIRS = [os.path.join(BASE_DIR, "templates"),]

TEMPLATE_LOADERS = ('django.template.loaders.filesystem.Loader',
                    'django.template.loaders.app_directories.Loader')


TEMPLATE_CONTEXT_PROCESSORS = [
    'django.template.context_processors.debug',
    'django.template.context_processors.request',
    'django.contrib.auth.context_processors.auth',
    'django.contrib.messages.context_processors.messages',
    'account.context_processors.account',
]


LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/

STATIC_URL = '/static/'


AUTHENTICATION_BACKENDS = (
    # 'emailusernames.backends.EmailAuthBackend',
    'account.auth_backends.EmailAuthenticationBackend',
    # Uncomment the following to make Django tests pass:
    # 'django.contrib.auth.backends.ModelBackend',
)

LOGIN_URL = "/accounts/login"

ACCOUNT_EMAIL_UNIQUE = True
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED = True

THEME_ACCOUNT_CONTACT_EMAIL = "cchilder@mail.usf.edu"

I followed the instructions at http://django-user-accounts.readthedocs.org/en/latest/installation.html and http://django-user-accounts.readthedocs.org/en/latest/installation.html

I see the correctly named templates in the https://github.com/pinax/pinax-theme-bootstrap-account/tree/master/pinax_theme_bootstrap_account/templates/account docs, but this error occurs when I try http://127.0.0.1:8005/account/signup/

How can I make these pinax themes work for django 1.7? Thank you

codyc4321
  • 9,014
  • 22
  • 92
  • 165
  • 1
    Try to change the `TEMPLATE_CONTEXT_PROCESSORS = [...]` to `TEMPLATE_CONTEXT_PROCESSORS = (...)`. – WayBehind Feb 09 '16 at 04:07
  • 1
    You may also need to add `'django.core.context_processors.media',` – WayBehind Feb 09 '16 at 04:08
  • 1
    You may want to check this answer http://stackoverflow.com/questions/15446558/where-is-template-context-processor-in-django-1-5/15446953#15446953 – Rohan Feb 09 '16 at 04:17
  • 1
    Can you confirm that you actually have a `context_processors.py` file under `account` app? Also there can be two conflicting apps named 'account' in your system. – Selcuk Feb 09 '16 at 06:00
  • rohan answered it, thank you – codyc4321 Feb 10 '16 at 20:52

0 Answers0