Opened 7 years ago

Closed 7 years ago

#18109 closed Uncategorized (invalid)

Page Stats Middleware break the admin site

Reported by: Pablo Catalina Owned by: nobody
Component: Generic views Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


The Page Stats Middleware from: break the admin site with the error:

Request Method: GET
Request URL:

Django Version: 1.4
Python Version: 2.7.2
Installed Applications:
Installed Middleware:

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/" in get_response
  105.                         response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/src/djangomiddlewares/" in process_view
  57.         if response and response.content:
File "/usr/local/lib/python2.7/dist-packages/django/template/" 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.

Change History (1)

comment:1 Changed 7 years ago by Aymeric Augustin

Resolution: invalid
Status: newclosed

The wiki is a community resource, and the StatsMiddleware is a third party add-on, not officially supported by the Django project.

You should report the problem to the djangomiddlewares project, and maybe edit the wiki to mention this problem.

Note: See TracTickets for help on using tickets.
Back to Top