You should write a field which does this. There is no field built in
to Django which does this.
--
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."
Unfortunately django doesn't presently support postgres' bytea out of
box. There is a patch in the tracker, though I don't know if it works
with recent django:
http://code.djangoproject.com/ticket/2417
One workaround for storing chunks of binary data is base64 encoding into
a text field, but that doesn't help you if you're trying to wrap an
existing postgresql database that happens to use bytea, and is not
exactly a high-performance solution (the better data integrity over fs
and ease of manipulation* might be worth it for you though, and
postgresql text (and bytea) fields work without problem to quite large
sizes (1GB))
* The "X-SendFile" API can allow you to use django-level code to
determine permissioning for filesystem files served through the
webserver though.