Can stale content types be automatically deleted in Django?

前端 未结 2 1896
抹茶落季
抹茶落季 2020-12-19 06:08

I\'m working with a PyQt application which uses Django to deliver it\'s content to desktop users.

In the latest update we have stale content types stored in the data

2条回答
  •  甜味超标
    2020-12-19 06:39

    I use this command to automatically answer yes in my scripts when I'm doing Django migrations:

    cat <(echo "yes") - | ./manage.py syncdb --migrate
    

    Note that this only takes care of the first prompt. You can read more about the details of how this works and how to add an automatic answer to a second prompt here:

    https://stackoverflow.com/a/16347534/1636882

提交回复
热议问题