djangosnippets.org: Latest snippets posted by petrillihttps://djangosnippets.org/users/petrilli/2009-06-23T17:17:23.645605-05:00petrilliEmail or username authentication with masquerading
2009-06-23T17:17:23.645605-05:00petrillihttps://djangosnippets.org/snippets/1590/<p>This backend will allow you to have users login using either their username or the email address as it is in the User model. In addition, it will allow anyone with the staff priveleges to login as another user. The method is to user the user you wish to masquerade …</p>
Freely redistributableProfiling Middleware w/sorting
2009-06-19T08:23:49.122849-05:00petrillihttps://djangosnippets.org/snippets/1579/<p>Based <em>very heavily</em> on the middleware in <a href="http://www.djangosnippets.org/snippets/727/">this snippet</a>. As with that one, append '?prof' to the URL to see profiling output instead of page output. The big change is that you can also pass an argument to control sorting.</p>
<p>For example, you can append '?prof=cumulative' to sort the …</p>
Freely redistributable