Forums

Can't access my admin (Mezzanine project)

So, I uploaded my mezzanine site, everything went well but I can't access my admin page. It gives an Attribute error in the context_processors.py What did I do wrong. This app works in local pc Oh, even my blog page.

2016-02-12 11:06:02,994 :Internal Server Error: /blog/
Traceback (most recent call last):
File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 140, in get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/pages/middleware.py", line 95, in process_view
return view_func(request, *view_args, **view_kwargs)
File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/blog/views.py", line 56, in blog_post_list
settings.BLOG_POST_PER_PAGE,
File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/conf/__init__.py", line 236, in __getattr__
editable_cache = self._get_editable(request=self._current_request)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/conf/__init__.py", line 150, in _get_editable
editable_settings = self._editable_caches[request]
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/conf/__init__.py", line 231, in __getattr__
return getattr(django_settings, name)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
return getattr(self._wrapped, name)
AttributeError: 'Settings' object has no attribute '_editable_caches'

and admin traceback

2016-02-12 07:21:38,874 :Internal Server Error: /admin/
Traceback (most recent call last):
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 174, in get_response
response = self.process_exception_by_middleware(e, request)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 172, in get_response
response = response.render()
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/response.py", line 160, in render
self.content = self.rendered_content
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/response.py", line 137, in rendered_content
content = template.render(context, self._request)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/backends/django.py", line 95, in render
return self.template.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 206, in render
return self._render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 197, in _render
return self.nodelist.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 173, in render
return compiled_parent._render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 197, in _render
return self.nodelist.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 173, in render
return compiled_parent._render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 197, in _render
return self.nodelist.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 69, in render
result = block.nodelist.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/loader_tags.py", line 69, in render
result = block.nodelist.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/template/__init__.py", line 61, in render
return tag_func(context, token)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/core/templatetags/mezzanine_tags.py", line 667, in dashboard_column
output.append(t.render(Context(context)))
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 206, in render
return self._render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 197, in _render
return self.nodelist.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 992, in render
bit = node.render_annotated(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/django/template/base.py", line 959, in render_annotated
return self.render(context)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/template/__init__.py", line 119, in render
result = tag_func(*parts)
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/generic/templatetags/comment_tags.py", line 72, in recent_comments
latest = context["settings"].COMMENTS_NUM_LATEST
 File "/home/webcalc/.virtualenvs/dsvenv/local/lib/python2.7/site-packages/mezzanine/conf/context_processors.py", line 28, in __getattr__
raise AttributeError
 AttributeError

Just a quick thing to double check- what versions of mezzanine and django are you using locally vs on pythonanywhere?

Django 1.9.2 and mezzanine 4.1.0 on both

That's really strange. After looking at the mezzanine code around where your exception is coming from, it looks like there is no way that I can see for that exception to happen. The only things that I can think of are perhaps you're missing a plugin or something from your virtualenv or perhaps there's some setup that you need to do. I'm totally at a loss about this one.

Maybe the mezzanine guys can provide some insight.