#23255: Migrations fail with custom models.Field
---------------------------------+----------------------
     Reporter:  django@…         |      Owner:  nobody
         Type:  Uncategorized    |     Status:  new
    Component:  Migrations       |    Version:  1.7-rc-2
     Severity:  Release blocker  |   Keywords:
 Triage Stage:  Unreviewed       |  Has patch:  0
Easy pickings:  0                |      UI/UX:  0
---------------------------------+----------------------
 Follow the example at https://docs.djangoproject.com/en/dev/howto/custom-
 model-fields/#writing-a-field-subclass

 and try to run `./manage.py migrate`

 The following exception is given:

 {{{
 Traceback (most recent call last):
   File "./manage.py", line 10, in <module>
     execute_from_command_line(sys.argv)
   File "/Users/patrick/.virtualenvs/migr/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 385, in
 execute_from_command_line
     utility.execute()
   File "/Users/patrick/.virtualenvs/migr/lib/python2.7/site-
 packages/django/core/management/__init__.py", line 377, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/Users/patrick/.virtualenvs/migr/lib/python2.7/site-
 packages/django/core/management/base.py", line 288, in run_from_argv
     self.execute(*args, **options.__dict__)
   File "/Users/patrick/.virtualenvs/migr/lib/python2.7/site-
 packages/django/core/management/base.py", line 337, in execute
     output = self.handle(*args, **options)
   File "/Users/patrick/.virtualenvs/migr/lib/python2.7/site-
 packages/django/core/management/commands/migrate.py", line 153, in handle
     ProjectState.from_apps(apps),
   File "/Users/patrick/.virtualenvs/migr/lib/python2.7/site-
 packages/django/db/migrations/state.py", line 104, in from_apps
     model_state = ModelState.from_model(model)
   File "/Users/patrick/.virtualenvs/migr/lib/python2.7/site-
 packages/django/db/migrations/state.py", line 181, in from_model
     e,
 TypeError: Couldn't reconstruct field field1 on migr2.MyModel: __init__()
 got multiple values for keyword argument 'verbose_name'
 }}}

 See my example project at
 https://github.com/pjrobertson/django_migrations_bug2
 and run `./manage.py migrate` to reproduce

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23255>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/060.4b22171cff258a0e4d11a240e8eb4589%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to