Reputation: 826
Just today I upgraded from Django 1.7 to 1.9.1, I have cleared all the other warnings however I am stuck with one that is preventing me from progressing. If anyone has any ideas as to what is causing this error that would be great, just let me know if you need to see any other code. Thanks!
Full Traceback -
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/
Django Version: 1.9.1
Python Version: 2.7.10
Installed Applications:
('django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'main',
'listings',
'profiles',
'allauth',
'allauth.account',
'allauth.socialaccount')
Installed Middleware:
('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')
Traceback:
File "C:\Python27\Lib\site-packages\django\core\handlers\base.py" in get_response
149. response = self.process_exception_by_middleware(e, request)
File "C:\Python27\Lib\site-packages\django\core\handlers\base.py" in get_response
147. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "D:\Other folders\Desktop\Student Job Search\code\opus_jobs_project\main\views.py" in index
8. return render(request, 'index.html', context_dict)
File "C:\Python27\Lib\site-packages\django\shortcuts.py" in render
67. template_name, context, request=request, using=using)
File "C:\Python27\Lib\site-packages\django\template\loader.py" in render_to_string
97. return template.render(context, request)
File "C:\Python27\Lib\site-packages\django\template\backends\django.py" in render
95. return self.template.render(context)
File "C:\Python27\Lib\site-packages\django\template\base.py" in render
204. with context.bind_template(self):
File "C:\Python27\lib\contextlib.py" in __enter__
17. return self.gen.next()
File "C:\Python27\Lib\site-packages\django\template\context.py" in bind_template
256. processors = (template.engine.template_context_processors +
File "C:\Python27\Lib\site-packages\django\utils\functional.py" in __get__
33. res = instance.__dict__[self.name] = self.func(instance)
File "C:\Python27\Lib\site-packages\django\template\engine.py" in template_context_processors
105. return tuple(import_string(path) for path in context_processors)
File "C:\Python27\Lib\site-packages\django\template\engine.py" in <genexpr>
105. return tuple(import_string(path) for path in context_processors)
File "C:\Python27\Lib\site-packages\django\utils\module_loading.py" in import_string
20. module = import_module(module_path)
File "C:\Python27\lib\importlib\__init__.py" in import_module
37. __import__(name)
Exception Type: ImportError at /
Exception Value: No module named context_processors
Template Settings - (I have a feeling the error may be around here or at least this may link to it)
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
TEMPLATE_PATH
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'allauth.account.context_processors.account',
'allauth.socialaccount.context_processors.socialaccount',
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.request',
],
},
},
]
Upvotes: 1
Views: 1771
Reputation: 43300
As you mention in the comments, it was the allauth
context processors that were causing the issues, I looked them up and they're no longer needed
From allauth changelog
Template context processors are no longer used. The context processor for allauth.account was already empty, and the context processor for allauth.socialaccount has been converted into the {% get_providers %} template tag.
Upvotes: 2