Simon Willison’s Weblog

Subscribe

Wednesday, 2nd June 2010

Appending the request URL to SQL statements in Django. A clever frame-walking monkey-patch which pulls the most recent HttpRequest object out of the Python stack and adds the current request.path to each SQL query as an SQL comment, so you can see it in debugging tools such as slow query logs and the PostgreSQL “select * from pg_stat_activity” query.

# 9:09 am / chris-lamb, debugging, django, orm, postgresql, python, sql, recovered, monkeypatch

Parsing file uploads at 500 mb/s with node.js. Handling file uploads is a real sweet spot for Node.js, especially now it has a high performance Buffer API for dealing with binary chunks of data. Felix Geisendörfer has released a new library called “formidable” which makes receiving file uploads (including HTML5 multiple uploads) easy, and uses some clever algorithmic tricks to dramatically speed up the processing of multipart data.

# 3:57 pm / binary, buffers, felixgeisendorfer, files, html5, javascript, node, nodejs, uploads, recovered

On Django And Migrations. South author Andrew Godwin on the plans for migrations in Django. His excellent South migration library will be split in to two parts—one handling database abstraction, dependency resolution and history tracking and the other providing autodetection and the South user interface. The former will go in to Django proper, encouraging other migration libraries to share the same core abstractions.

# 4:27 pm / andrew-godwin, django, migrations, orm, south, recovered

2010 » June

MTWTFSS
 123456
78910111213
14151617181920
21222324252627
282930