The meta option is already there. And the myproject_country table is still created.
On Apr 10, 4:51 pm, Ramiro Morales <cra...@gmail.com> wrote: > On Fri, Apr 10, 2009 at 5:29 PM, nixon66 <nixon....@gmail.com> wrote: > > > I have a legacy database that I used inspectdb on to generate models. > > Once I generated the models and cleaned them up, I ran manage.py > > syncdb. Everything went fine except I have one model that it creates > > another table from with the name of the app attached to the front. So > > the model is called country. But django adds another table called > > myporject_country to the database. Anyone know why it would do this > > and what is the solution? > > Use the db_table Meta option: > > http://docs.djangoproject.com/en/dev/ref/models/options/#db-table > > class Country(models.Model): > # ... > class Meta: > db_table = ' country' > > HTH, > > -- > Ramiro Moraleshttp://rmorales.net --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---