摘要:
修改polls/admin.py from django.contrib import adminfrom .models import Question, Choice# Register your models here.class ChoiceInline(admin.TabularInlin 阅读全文
摘要:
添加CSS样式表 在polls包下面新建static包, 在static包下面新建polls包, 在polls/static/polls包下面新建style.css: 修改polls/templates/polls/index.html 在顶部添加以下内容,该模板标签生成静态文件的绝对路径{% st 阅读全文
摘要:
新建polls/templates/polls/detail.html 新建polls/templates/polls/results.html 修改polls包里面的views.py 修改polls包里面的polls_urls.py python manage.py runserver 启动服务 阅读全文