Django-admin.py startproject mysite
This command creates a mysite directory in the current directory.
Django-admin.py file in c: \ python27 \ Lib \ Site-packages \ Django \ bin folder, you can add this directory to the system path.
Django has a built-in lightweight Web server.
If you enter the mysite directory, enter the Directory and runPython manage. py runserverCommand
Start the server and Use http: // 127.0.0.1: 8000/to browse the server. 8000 is the default port number.
Python manage. py runserver 8080
Change server port number
Python manage. py Shell
Start interaction interface
Python manage. py Startapp books
Create an app named books
Python manage. py validate
Verify that the Django Data Model Code is incorrect.
Python manage. py sqlall books
Generate SQL code for the model
Python manage. py syncdb
Run the SQL statement to create the corresponding table of the model.
Python manage. py dbshell
Command line tool for starting a database
Manage. py sqlall books
View all tables in the books app
Python manage. py syncdb
Synchronize databases and generate additional database tables used on the Management Interface