Ticket #230 (closed defect: worksforme)

Opened 6 years ago

Last modified 6 years ago

django not imported for auto generated migrations

Reported by: anonymous Owned by: andrew
Priority: major Milestone:
Component: commands Version: 0.6
Keywords: Cc:


the orm part of a migration specifies something like 'django.models.fields.TextField?' etc... but if the migration is run i get the following error:

ValueError?: Cannot successfully create field 'snippet' for model 'snippetptrpublic': name 'django' is not defined.

if I replace django.models.fields.TextField? with models.TextField? everything works... or if manually import django in the migration.

Change History

comment:1 Changed 6 years ago by andrew

  • Status changed from new to closed
  • Resolution set to worksforme

This is a bug with the autogenerator; if you upgrade to the current mercurial tip and re-make the affected migration, the problem should go away.

Note: See TracTickets for help on using tickets.