Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Render "Hi" | The First Application
Django: Build Your First Website

Render "Hi"Render "Hi"

In this chapter, we will be working with two files, urls.py and views.py.

  • In views.py, we will write a function that will display a page in the browser with the message "Hello, world!";
  • In the urls.py file, we will create a URL address for our page.

We have the implemented hi view in views.py file.

AppFolder \ views.py

Import this view to the urls.py and add path to urlpatterns.

AppFolder \ urls.py

Video Explanation

Please note, in our project and in the video, our Django application is named "notes".

In which file do you need to write URLs?

Selecione a resposta correta

Tudo estava claro?

Seção 2. Capítulo 4
course content

Conteúdo do Curso

Django: Build Your First Website

Render "Hi"Render "Hi"

In this chapter, we will be working with two files, urls.py and views.py.

  • In views.py, we will write a function that will display a page in the browser with the message "Hello, world!";
  • In the urls.py file, we will create a URL address for our page.

We have the implemented hi view in views.py file.

AppFolder \ views.py

Import this view to the urls.py and add path to urlpatterns.

AppFolder \ urls.py

Video Explanation

Please note, in our project and in the video, our Django application is named "notes".

In which file do you need to write URLs?

Selecione a resposta correta

Tudo estava claro?

Seção 2. Capítulo 4
some-alt