This probably isn't what you inteded to write. The db_column attribute
specifies what the name of the database column in *this* table will be
called. The name of the column in the table it refers to is worked out
automatically (since it's almost always the primary key of that table
and for other cases, Django has the to_field attribute).
Regards,
Malcolm
>
Oh, thanks. Ok, I just tried taking that out (so model now says "staff_id = models.ForeignKey(User)"), but that gave this error:OperationalError: (1054, "Unknown column 'restaurant.staff_id_id' in 'field list'")?