Archives for the ‘django’ Category

unable to remap C:\cygwin\bin\tk84.dll to same address as parent

I was checking out Tauber’s Pinax, and came across VirtualEnv for the first time. Those are two cool projects.
However, building PIL on Cygwin Python 2.5 yields the following error message:
unable to remap C:\cygwin\bin\tk84.dll to same address as parent
Thanks to the power of Google, DataHammer has already found a resolution

C:\>cd \cygwin\bin
C:\cygwin\bin>ash
$ ./rebase -b 0×1000000000 tk84.dll

Cygwin Python and sqlite3

Apparently, cygwin’s distribution of Python 2.5.1 doesn’t come with sqlite3. This is a pity for those who would like to work with Django using cygwin Python.
Building _sqlite3.dll on cygwin is not too difficult. If you are in a hurry, heres the download _sqlite3.dll.
Prerequisites

/bin/cygsqlite3-0.dll
/bin/libpython2.5.dll
/usr/include/sqlite3.h
/usr/include/python2.5/Python.h [et.c]

tar jxf Python-2.5.2.tar.bz2 Python-2.5.2/Modules/_sqlite/
cd Python-2.5.2/Modules/_sqlite/
gcc -shared -o _sqlite3.dll -I /usr/include/python2.5 -L /bin [...]

Rich Metadata Mediated UI development

What would you automate into your boilerplate code after having 10 years of writing database applications? Here are some links to promising projects/essays:

Andromeda
Django Admin
Dataphor
Promises: User interface “hints” integrated with the data model

Naked Objects
MS Access and Query By Form
I like how CodeIgniter makes it possible to compose declarative data validations e.g. “valid_email|matches[email_confirm]|min_length[6]“
We need standard ValueConverters [...]

Django shortcuts

I’ve exceedingly poor memory, so here’s my shortcuts.

python manage.py dumpdata > data.json
python manage.py reset registration
python manage.py loaddata data.json