The following article explains how to Create a Django Project on Command Line.
- Open your command prompt or terminal on your computer.
- Navigate to the directory for creating the Django project. For example, to create the project in the “Desktop” directory, you can enter the command
cd Desktop
. - Enter the command
django-admin startproject myproject
in the command prompt, wheremyproject
is the name you want to give your project. This will create a new directory with the same name as your project, and the necessary files and folders inside it.
django-admin startproject myproject
- Navigate into the project directory by entering the command
cd myproject
.
cd myproject
- You can then create new Django apps inside this project using the command given next.
Also, myapp
is the name you want to give your app.
python manage.py startapp myapp
That’s it! You have now created a new Django project named “myproject” and a new app named “myapp” inside it. You can start building your web application by editing the files in the “myapp” directory. To run the development server, use the following.
python manage.py runserver
.
Further Reading
Introduction to Django Framework and its Features
Examples of Array Functions in PHP
Registration Form Using PDO in PHP
Inserting Information from Multiple CheckBox Selection in a Database Table in PHP