djangosnippets.org: Latest snippets tagged with 'request-path'https://djangosnippets.org/tags/request-path/2011-12-11T09:26:47.236978-06:00another request logging middleware with request time and extra info
2011-12-11T09:26:47.236978-06:00yoavhttps://djangosnippets.org/snippets/2624/<p>Simple logging middleware that captures the following:
* remote address (whether proxied or direct)
* if authenticated, then user email address
* request method (GET/POST etc)
* request full path
* response status code (200, 404 etc)
* content length
* request process time
* If DEBUG=True, also logs SQL …</p>
Freely redistributableGet the full request path
2007-02-27T19:12:47.910141-06:00limodouhttps://djangosnippets.org/snippets/41/<p>The result maybe:</p>
<pre><code>http://localhost/test/
</code></pre>
<p>And for request.path, it will not include the domain field(http://localhost).</p>
Freely redistributable