When I last used inspectdb, a field named "from" in a table was renamed automatically to "from_field." There was a comment in the output: "Field renamed because it was a Python reserved word." But for the unique_together meta property for that model, the "from" field name was used, not the "from_field" name. Thus I received an error when using runserver: "'unique_together' refers to the non-existent field 'from'."
The original issue for adding unique_together support is #23028, I believe.
Here's an example of what I mean:
class PsSpecificPrice(models.Model):
. . .
from_field = models.DateTimeField(db_column='from') # Field renamed because it was a Python reserved word.
to = models.DateTimeField()
class Meta:
managed = False
db_table = 'ps_specific_price'
unique_together = ((. . . 'from', 'to'),)
Patch submitted in: https://github.com/django/django/pull/5562