SQL Debug middleware

2007-04-21 Thread Jesse Lovelace
Hey all, I made this the other day to help me track all the sql statements my pages were doing. I wanted something unobtrusive (i.e. middleware) and simple. Hope you like: from django.db import connection import re, pprint body_end = re.compile('', re.IGNORECASE) class

models in separate files - relation help

2007-04-14 Thread Jesse Lovelace
Hi all, Would anyone be able to give some "best practice" information on how to use django with multiple models files? My current setup is (SVN Django): /myproject/ app1/ models/ __init__.py - has all of the "from tag import Tag" lines so syncdb works (when validation

HTTP faking

2007-04-12 Thread Jesse Lovelace
Hi all, I've been interested in the idea of faking HTTP methods that browsers/servers might not support like the rails people are doing in 1.2 so I've written a very minimal middleware to do this--if someone else has done this already sorry for the repetition. (It does the method faking using a