Hi

I have the following scenario in my forms.py:

UNIVERSITY_CHOICES = University.objects.values_list('id', 'name')

class UniversityForm(forms.Form):
    name = forms.CharField(widget=forms.Select(attrs={"class":
"selectpicker", "data-live-search": "true","title": "find
university..."},choices=UNIVERSITY_CHOICES), required=False)

The migration fails as it is expecting the university table to exist
but does not yet.
This is clearly an anti-pattern on my part. What is the correct way to
approach this?

thanks
Chris

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACQBJYWMPHHnH7fs4ogYerxoT953pyX_K9eeKjgoMjjefXwo8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to