Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Start Project | Get Started
Django: First Dive
course content

Conteúdo do Curso

Django: First Dive

Django: First Dive

1. Get Started
2. Write the First Page
3. Models
4. Working with Database
5. Templates
6. Request Handling

bookStart Project

To start a project, we should create a Virtual Environment for this project.

You can create a new project using the IDE or perform a few actions:

Step 1. Install Django using the following command:

Note

If pip doesn't works, try the pip3.

Step 2. Initialize a new Django project using the following command:

The command django-admin startproject Main . is used to create a new Django project with the name "Main" in the current directory. Let's break it down:

  • django-admin: This is the command-line utility provided by Django that allows you to perform various administrative tasks related to Django projects.

  • startproject: This is a subcommand of django-admin that is used to create a new Django project.

  • Main: This is the name given to the Django project. You can replace "Main" with any desired name for your project. This name will be used as the project's directory name and as a reference in various Django settings.

  • .: The dot represents the current directory. By including the dot at the end of the command, you are indicating that you want to create the Django project in the current directory instead of creating a new subdirectory.

In summary, running django-admin startproject Main . creates a new Django project with the name "Main" in the current directory, setting up the initial structure and files needed for a Django project.

After executing the command in the Terminal, a built project with the following structure awaits us:

What command should be used in the terminal to initialize the project?

What command should be used in the terminal to initialize the project?

Selecione a resposta correta

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 3
We're sorry to hear that something went wrong. What happened?
some-alt