Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>
> I'm adapting a legacy database for use with Django and I've come
> across a problem I haven't been able to solve!
>
> The database has ForeignKey fields which are sometimes 0, meaning
> there is no related row in the other table. If this databa
Nick,
Maybe only your print isnĀ“t working.
Look at this class:
http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/__init__.py#L982
If you really want to check if it is working, do:
fp = open("/writable/path/to/log.txt", "w")
class ForeignKeyWithZeros(models.ForeignKey):
I'm adapting a legacy database for use with Django and I've come
across a problem I haven't been able to solve!
The database has ForeignKey fields which are sometimes 0, meaning
there is no related row in the other table. If this database used
NULL instead of 0 then I could use ForeignKey(Other,
3 matches
Mail list logo