Saturday, April 9, 2011

Re: Missing step to syncdb from models.py?

I found the problem. I needed to put 'foo' (and 'django.contrib.admin') in settings.INSTALLED_APPS.

On Sat, Apr 9, 2011 at 2:29 PM, Jonathan Hayward <christos.jonathan.hayward@gmail.com> wrote:
I am missing a step in configuration, I believe, in getting a syncdb to create tables for the models in models.py.

I've attached a tarball of a project foo, in which I created a model bar, and ran a python manage.py syncdb, with the output scripted to syncdb.out. Some tables have been created; however the table foo_bar does not exist.

What is the step that I am missing? If I wipe the database, what do I need to do so that a python manage.py syncdb will create tables like foo_bar for the contents of models.py?

(And on a related note, is there any additional configuration to get all the tables created for the Django admin interface to work? For another project, I couldn't save objects because an admin interface table didn't exist.)

--
Christos Jonathan Hayward
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio • Books • Email • Facebook • LinkedIn • Twitter • Web • What's New?

I invite you to visit my "theology, literature, and other creative works" site.




--
Christos Jonathan Hayward
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio • Books • Email • Facebook • LinkedIn • Twitter • Web • What's New?

I invite you to visit my "theology, literature, and other creative works" site.

--
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