Django - Mac OSX Workflow - Questions on efficient development methodologies

后端 未结 4 1808
独厮守ぢ
独厮守ぢ 2021-02-02 04:31

I am going to outline my workflow and I would like some suggestions on how to improve the efficiency of this. It seems right now a bit cumbersome and repetitive (something I ha

4条回答
  •  不思量自难忘°
    2021-02-02 04:39

    First of all, no need to do a ./manage.py runserver until your models are in place.

    Second, clear the database/rebuild the database should be done after fixing the code, and can be done in one fell swoop with ./manage.py reset perforce

    Third, the things that you are typing out in the shell each time (import models, try creating an object) should be written in a test suite instead. Then you can do ./manage.py test perforce instead of firing up the shell and typing it again. Actually, if you're using the test suite, you won't need to, because it will create a clean dummy db each time, and break it down for you when it's done.

    Fourth, Instead of "PRAY...", try "Watch tests pass."

提交回复
热议问题