深度阅读

How to create a new Django project?

作者
作者
2023年08月22日
更新时间
8.86 分钟
阅读时间
0
阅读量

To create a new Django project, you can use the django-admin command-line utility. Here are the steps you need to follow:

  1. Open a command prompt or terminal window.
  2. Navigate to the directory where you want to create the Django project.
  3. Type the following command to create a new Django project:
django-admin startproject projectname

Replace projectname with the name you want to give to your Django project.
4. Once the command finishes executing, a new directory will be created with the same name as your project containing various files and directories.

That’s it! You have now created a new Django project. To verify that everything is working, you can run the development server using the following command:

python manage.py runserver

Then you can visit http://localhost:8000 in a web browser to see the default “Welcome to Django” page.

相关标签

博客作者

热爱技术,乐于分享,持续学习。专注于Web开发、系统架构设计和人工智能领域。