You can also use ./manage.py validate to get django to check over your models. Sometimes syncdb or others will fail because of a model validation issue.
Alex On Jun 28, 3:20 pm, Jonathan Hayward <christos.jonathan.hayw...@gmail.com> wrote: > P.S. This problem did not resurface after I made other changes discussed > elsewhere in the thread; it seems to be secondary damage. > > On Mon, Jun 28, 2010 at 2:46 PM, Jonathan Hayward < > > > > christos.jonathan.hayw...@gmail.com> wrote: > > Thanks for pointing me to South. I've glanced over it, but I did have one > > question: > > > My understanding is that Django will introduce tables for models that have > > been added on a syncdb, but not alter tables for models that have been > > changed. And from a glance at the documentation, it looks like South would > > provide more granularity. > > > However, it is my understanding that this should have the consequence that > > if you start with a fresh database and run syncdb, then that should result > > in appropriate tables. This might not be a first choice way to update the > > database as normally wiping the database when you implement a schema update > > is not desirable if you have any real data, but my understanding from the > > documentation is that this forceful solution should work. If I'm mistaken, > > I'd like to know both how I presently misunderstand, and what an appropriate > > way is to generate a fresh database with tables matching your models. > > > On Fri, Jun 25, 2010 at 5:25 PM, Mark Linsey <mjlin...@gmail.com> wrote: > > >> I don't quite understand what changes you made before producing this > >> error, and I'm totally unfamiliar with sqllite. > > >> But I do know that for many (really, most) different model changes, just > >> running syncdb will not make the appropriate changes to your tables. You > >> probably need to look into south migrations. > > >> On Fri, Jun 25, 2010 at 2:09 PM, Jonathan Hayward < > >> christos.jonathan.hayw...@gmail.com> wrote: > > >>> P.S. Renaming the (SQLite) database file and running syncdb again > >>> produces (basically) the same behavior. I had to do some initialization > >>> things again, but outside of that I got equivalent behavior to what I > >>> pasted > >>> below. > > >>> What I am trying to do is create a few instances of the Entity model > >>> defined in my [directory/]models.py. So far I have managed to get them to > >>> show up as an option to manage in the admin interface, but not yet to save > >>> one. > > >>> Should it be looking for directory_models_entity instead of > >>> directory_entity? "entity" seems not to be populated; from the command > >>> line > >>> sqlite3: > > >>> sqlite> .tables > >>> auth_group auth_user_user_permissions > >>> auth_group_permissions django_admin_log > >>> auth_message django_content_type > >>> auth_permission django_session > >>> auth_user django_site > >>> auth_user_groups > > >>> On Fri, Jun 25, 2010 at 3:00 PM, Jonathan Hayward < > >>> christos.jonathan.hayw...@gmail.com> wrote: > > >>>> I received the error below from the admin interface; I thought it was > >>>> because I needed to run a syncdb, but stopping the server, running a > >>>> syncdb, > >>>> and restarting has generated the same error: > > >>>> OperationalError at /admin/directory/entity/ > > >>>> no such table: directory_entity > > >>>> Request Method:GET Request URL: > >>>>http://linux:8000/admin/directory/entity/Exception Type: > >>>> OperationalError Exception Value: > > >>>> no such table: directory_entity > > >>>> Exception > >>>> Location:/usr/lib/pymodules/python2.6/django/db/backends/sqlite3/base.py > >>>> in execute, line 193 Python Executable:/usr/bin/python Python Version: > >>>> 2.6.5 Python Path:['/home/jonathan/directory', > >>>> '/usr/local/lib/python2.6/dist-packages/pip-0.6.3-py2.6.egg', > >>>> '/home/jonathan/store/src/satchmo/satchmo/apps', > >>>> '/usr/local/lib/python2.6/dist-packages/django_threaded_multihost-1.3_3-py2.6.egg', > >>>> '/usr/local/lib/python2.6/dist-packages/django_signals_ahoy-0.1_1-py2.6.egg', > >>>> '/usr/local/lib/python2.6/dist-packages/django_tagging-0.3.1-py2.6.egg', > >>>> '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', > >>>> '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', > >>>> '/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages', > >>>> '/usr/lib/python2.6/dist-packages/PIL', > >>>> '/usr/lib/python2.6/dist-packages/gst-0.10', > >>>> '/usr/lib/pymodules/python2.6', > >>>> '/usr/lib/python2.6/dist-packages/gtk-2.0', > >>>> '/usr/lib/pymodules/python2.6/gtk-2.0', > >>>> '/usr/local/lib/python2.6/dist-packages'] Server time:Fri, 25 Jun 2010 > >>>> 14:56:26 -0500 > > >>>> I have an Entity class/model defined in my models.py and want to > >>>> manually create some dummy data in the table. Any suggestions? > > >>>> -- > >>>> → Jonathan Hayward, christos.jonathan.hayw...@gmail.com > >>>> → An Orthodox Christian author: theology, literature, et cetera. > >>>> → My award-winning collection is available for free reading online: > >>>> ☩ I invite you to visit my main site athttp://JonathansCorner.com/ > > >>> -- > >>> → Jonathan Hayward, christos.jonathan.hayw...@gmail.com > >>> → An Orthodox Christian author: theology, literature, et cetera. > >>> → My award-winning collection is available for free reading online: > >>> ☩ I invite you to visit my main site athttp://JonathansCorner.com/ > > >>> -- > >>> You received this message because you are subscribed to the Google Groups > >>> "Django users" group. > >>> To post to this group, send email to django-us...@googlegroups.com. > >>> To unsubscribe from this group, send email to > >>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > >>> . > >>> For more options, visit this group at > >>>http://groups.google.com/group/django-users?hl=en. > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Django users" group. > >> To post to this group, send email to django-us...@googlegroups.com. > >> To unsubscribe from this group, send email to > >> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > >> . > >> For more options, visit this group at > >>http://groups.google.com/group/django-users?hl=en. > > > -- > > → Jonathan Hayward, christos.jonathan.hayw...@gmail.com > > → An Orthodox Christian author: theology, literature, et cetera. > > → My award-winning collection is available for free reading online: > > ☩ I invite you to visit my main site athttp://JonathansCorner.com/ > > -- > → Jonathan Hayward, christos.jonathan.hayw...@gmail.com > → An Orthodox Christian author: theology, literature, et cetera. > → My award-winning collection is available for free reading online: > ☩ I invite you to visit my main site athttp://JonathansCorner.com/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.