Having a couple of problems upgrading a site from Django 1.9.5/ Mezz 4.10 /
Cartridge 0.11 to Django 1.10.4 / Mezz 4.2.0 / Cartridge 0.12
* tests
* any custom Page views
Re. the tests, the following test fails even though index view works fine
in browser
def test_homepage(self):
# self.client = Client()
response = self.client.get('/')
# print response
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.context['featured_productions']), 3)
self.assertNotEqual(response.context['latest_tweet'].text,"")
returns
File
"/home/michela/env/mod/local/lib/python2.7/site-packages/django/utils/module_loading.py"
, line 20, in import_string
module = import_module(module_path)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named context_processors
Re. page view overrides
My index view, Cartridge shop and all pages that use the generic views work
but wherever I've got a custom view like
def profile(request, template="pages/profile.html"):
# logging.debug(slug)
featured_productions = Production.objects.published().filter(featured=
True)[:3]
if 'mezzanine-device' in request.COOKIES:
if request.COOKIES['mezzanine-device'] == 'mobile':
template = "mobile/"+template
return render_to_response(template, {
"featured_productions" : featured_productions,
})
I'm getting
File
"/home/michela/env/mod/lib/python2.7/site-packages/mezzanine/core/templatetags/mezzanine_tags.py"
, line 491, in parse_field
obj = getattr(obj, field.pop(0))
AttributeError: 'NoneType' object has no attribute 'richtextpage'
I must confess I've never worked out where and how the page object is
automagically associated with the right template but it used to work fine
in Mezz 4.1.0
Any suggestions on where to look?
> * ``django.template.context_processors`` is removed in Django 1.10 -
Stephen McDonald
I was wondering if this might be related to the issue but don't understand
the impact.
Michela
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.