質問

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