<ul class="num_t clr"> {% for obj in ""|ljust:"10" %} <li>{{ forloop.counter }}</li> {% endfor %} </ul> 官网是这样使用: ljust Left-aligns the value in a field of a given width. Argument: field size For exampl
之前我们已经有了自己的视图mysite.views.py中,应该是这样子的 from django.http import HttpResponse import datetime def current_dt(request): now = datetime.datetime.now() html = "<html><body>it is now %s.</body></html>" % now return HttpResponse(