Home Page Microblog



Download 2,44 Mb.
Pdf ko'rish
bet15/17
Sana30.12.2021
Hajmi2,44 Mb.
#90837
1   ...   9   10   11   12   13   14   15   16   17
Bog'liq
mega-tutorial

microblog\

venv\

app\

__init__.py

routes.py

microblog.py

To run the application you set the



FLASK_APP=microblog.py

in your terminal session, and

then execute

flask run

. This starts a web server with the application, which you can open

by typing the http://localhost:5000/ URL in your web browser’s address bar.

In this chapter you will continue working on the same application, and in particular, you are

going to learn how to generate more elaborate web pages that have a complex structure and

many dynamic components. If anything about the application or the development workflow so

far isn’t clear, please review

Chapter 1

again before continuing.

The GitHub links for this chapter are:

Browse

,

Zip

,

Diff

.

2.1


What Are Templates?

I want the home page of my microblogging application to have a heading that welcomes the

user. For the moment, I’m going to ignore the fact that the application does not have the concept

11



12

CHAPTER 2. TEMPLATES

of users yet, as this is going to come later. Instead, I’m going to use a mock user, which I’m

going to implement as a Python dictionary, as follows:




Download 2,44 Mb.

Do'stlaringiz bilan baham:
1   ...   9   10   11   12   13   14   15   16   17




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish