第 06 篇:博客从\"裸奔\"到\"有皮肤\"

明星八卦 浏览(1536)

p ???μ?HelloGitHub-Team? [1]

??д???网址?壬? django ?? HTTP ?? HTTP ???仰??'?你好,世界 ??? С?

??д?????????? ??????[2] ??

?? django ??? URL ?网址???д? urls.py ?? urls.py ????壬? settings.py?н??? django ????? HTTP ???ú?????????

????

Blog/views.pyfrom django.shortcuts import renderfrom .models import Postdef index(request): tpost_list=Post.objects.all()。order_by(' - created_time')treturn render(request,'blog/index.html',context????objects?á??all()??????post_list?all??QuerySet?????????б???е?μ????order_by?? queryset ???created_time??-?? -???? blogindex.html ???б?post_list??

?????????????????????[3] ?? HTML ?? CSS ? JavaScript ????? django ?Щ?? django ??? JavaScript ???? CSS ?Ч?

?? CSS ? JavaScript ?blog ??? ?静态的 ??blog ????静电?? CSS ? JavaScript ????к?博客 ?? CSS ? JavaScript ??静态的 ?博客?У?? css ? js ??博客t__init__.py tstatic ttblog tttcss tttt.css ? tttjs tttt.js ? admin.py apps.py migrations t__init__.py models.py tests.py views.py

??е? index.html ?我?? index.html ???п????