#18109: Page Stats Middleware break the admin site -------------------------------+-------------------- Reporter: pcatalina | Owner: nobody Type: Uncategorized | Status: new Component: Generic views | Version: 1.4 Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------+-------------------- The Page Stats Middleware from: https://code.djangoproject.com/wiki/PageStatsMiddleware break the admin site with the error:
{{{ Request Method: GET Request URL: http://127.0.0.1:8000/admin/ Django Version: 1.4 Python Version: 2.7.2 Installed Applications: ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'django.contrib.admindocs') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'djangomiddlewares.middleware.StatsMiddleware') Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 105. response = middleware_method(request, callback, callback_args, callback_kwargs) File "/usr/local/src/djangomiddlewares/middleware.py" in process_view 57. if response and response.content: File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in _get_content 123. raise ContentNotRenderedError('The response content must be ' Exception Type: ContentNotRenderedError at /admin/ Exception Value: The response content must be rendered before it can be accessed. }}} I make a "temporal" adding: {{{ if request.path.startswith('/admin/'): return None }}} But I think the problem must break other things. -- Ticket URL: <https://code.djangoproject.com/ticket/18109> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.