What I want is the functionality

python manage.py reset myapp

What is the equivalent in django 1.5 ? I am using this in development environmenti.e. sqlite (I dont want flush. )

有帮助吗?

解决方案

One way is to use django_reset package which ports reset back in django 1.5:

This is a port of Django's reset management command that was shipped with Django 1.4.x and earlier. Django 1.5 removed this command.

There might be good reasons not to further maintain it in the Django core, however it was always quite useful during prototyping a new Django based project. Thats why I decided to bring it to Django 1.5 and higher with this app.

其他提示

Check this question. By the way, try to use South. It allows migrations. It should help to aviod using "reset".

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top