Sorry I was not clear. I have some utilities in view.py which have to reload tables content (migration from the legacy database; clearing a table and reloading with base content; ...)
I know from the shell it is enough an "python manage py flush", but I have two problems: * the action have to be triggered by a user action on a form * the id have to be resetted because for me the id=0 and id=1 rows have a fixed special meaning I have not found anything about deleting tables in http://docs.djangoproject.com/en/dev/topics/db/queries/ (it seems that "database api" has gone in 1.0) The only thing that seems I can use is "Executing custom SQL" in http://docs.djangoproject.com/en/dev/topics/db/models/ There is a better/recommended method? Thanks Mirto Erik Allik ha scritto: > $ manage.py dbshell > > DROP TABLE table_name; > > Django does not currently have a database schema management tool (with > the exception of syncdb and sql* commands). > > Erik > > > On 17.10.2008, at 15:30, Mirto Silvio Busico wrote: > > >> Hi all, >> >> what is the django way o deleting all table content and resetting the >> primary key counter? >> >> Thanks >> Mirto >> >> -- >> >> _________________________________________________________________________ >> Busico Mirto Silvio >> Consulente ICT >> cell. 333 4562651 >> email [EMAIL PROTECTED] >> >> >> > > > > > > -- _________________________________________________________________________ Busico Mirto Silvio Consulente ICT cell. 333 4562651 email [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---