#25837: migration fails when there is initial option set on form field
-------------------------------+--------------------
     Reporter:  kaselis        |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  1.9rc1
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 It requires some setup to reproduce it, but essentially: create a new
 project, create a new app, create a simple form, for example:

 {{{
 #!div style="font-size: 80%"
 {{{
 from .models import Item

 class ReportForm(forms.Form):
     items = forms.ModelMultipleChoiceField(
         queryset=Item.objects.all(),
         widget=forms.CheckboxSelectMultiple,
         initial=[item for item in Item.objects.all()])
 }}}
 }}}

 Import that form in the view and that view in urls and migration starts to
 fail, complaining about missing table (django.db.utils.OperationalError:
 no such table: myapp_item). It does work fine in django 1.8. Attaching
 sample project. Tested on django 1.9rc2 (dropdown doesn't have that
 version to select)

--
Ticket URL: <https://code.djangoproject.com/ticket/25837>
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/050.3de7a8d8eb4bd361780e8e47ef6fbb8a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to