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

Kursinnehåll

Django: Build Your First Website

Django: Build Your First Website

1. Get Started
2. The First Application
3. Models
4. CRUD Operations
5. Templates
6. Forms and Dynamic URLs

book
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.

python

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

python

Video Explanation

question mark

In which file do you need to write URLs?

Select the correct answer

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 2. Kapitel 4
Vi beklagar att något gick fel. Vad hände?
some-alt