uses Django to start the command line and script, so it can be easily used to develop Django framework, for example, the operation of database.

below, respectively, describes the use of methods.

django shell startup

boot command:

 $/data/python-virtualenv/apple/bin/python /data/example/apple/ shell

django shell has configuration information of Django, which can use the framework of Django. For example, defining model as Apples can directly query all records using Apples.objects.all ().

 > a=Apples.objects.all () > print a

script path must be, for example, to create a script for reference. The gement/commands/

code is as follows:

 coding: UTF-8 * - from import BaseCommand from monitor. R.main_entry () 


 $/data/python-virtualenv/apple/bin/python /data/example/apple/ AutoCheckTicket 

above this use Django to start the command line and the execution of the script method is to share all of the contents of the small editor, hope to be large A home reference, and I hope you will support the script home.

that you might be interested in:

This concludes the body part

This paper fixed link: | Script Home | +Copy Link

Article reprint please specify:Using Django to start the command line and execute script | Script Home

You may also be interested in these articles!