Friday, March 28, 2014

Re: ManytoManyField (through) not showing up !

Did you add this field after you had already run syncdb? If so, you won't see it running syncdb again, that command only adds new models, it does not pick up modifications to models.

You have a couple of options.
1) If you are in development, you can just drop your existing database and use syncdb to recreate it with the new fields.
2a) If you are using django < 1.7, you can use south to handle database migrations
2b) If using django 1.7, use the built in migrations (which is a reimplementation of south in django core

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e65bd8f1-12a7-4226-8663-b07eab35dfce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment