一、管理admin
1、修改顺序
|
|
使得pub_date显示在question_text前面。
|
|
使得pub_date显示在question_text前面。
创建static在app的目录下,polls/static/。和建立templates类似,还需要在建立app名字命名的文件夹。将文件放于其下polls/static/polls/。
建立css文件夹,再建立style.css,写入:
修改index.html
写测试类,在app的tests.py文件下。
在终端运行。
|
|
其中forloop.counter是指for循环了多少次。
添加更多的视图,在app的views.py下: