http://docs.djangoproject.com/en/dev/ref/django-admin/#syncdb
"Syncdb will not alter existing tables
syncdb will only create tables for models which have not yet been
installed. It will never issue ALTER TABLE statements to match changes
made to a model class after installation."
On Oct 3, 8:31 pm, mathphreak <mathphr...@gmail.com> wrote:
> Django doesn't modify table structures after they're created? That
> would explain it. Thanks!
>
> On Oct 3, 3:27 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
> > On Oct 3, 2:37 am, mathphreak <mathphr...@gmail.com> wrote:
>
> > > I've got three different classes in models.py and register all three
> > > in admin.py within my app. Viewing the admin page that I have,
> > > however, gives mehttp://dpaste.com/252244/whichdoesn'tlook good.
> > > Is this a Django bug, or do I need to rewrite my app? I think it's
> > > highly unlikely that it's a Django bug.
>
> > > I'm trying to follow along with the tutorial given onhttp://docs.djangoproject.com/en/dev/intro/tutorial01/, if it helps.
> > > My admin.py code ishttp://dpaste.com/252254/andmymodels.py ishttp://dpaste.com/hold/252256/.
>
> > You've presumably created your models, run ./manage.py syncdb, then
> > changed your model code - in this case by adding the ForeignKey from
> > SupportItem to Name. Django won't modify your models once you've
> > created them, so you will need to drop the tables and re-run syncdb.
> > --
> > DR.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment