首页
注册
登录
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请
登录
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
django bbs 在模板里这样循环楼层:{{ forloop.counter }}楼,如果遇到分页。第二页又从 1 开始计数了。这个有什么好办法解决? 让楼层接下去?
bb2018
·
2017-08-05 17:51:33 +08:00
· 2425 次点击
这是一个创建于 2454 天前的主题,其中的信息可能已经有所发展或是发生改变。
楼层
unt
django
bbs
2 条回复
•
2017-08-05 18:55:04 +08:00
1
jasonqiao36
2017-08-05 18:33:15 +08:00
没用过 django,参考一下
{{ forloop.counter + (当前页码-1) * 每页条目数 }}
2
solidsnake
2017-08-05 18:55:04 +08:00 via iPhone
Paginatior 直接用啊
关于
·
帮助文档
·
博客
·
API
·
FAQ
·
我们的愿景
·
实用小工具
·
3484 人在线
最高记录 6543
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 35ms ·
UTC 10:52
·
PVG 18:52
·
LAX 03:52
·
JFK 06:52
Developed with
CodeLauncher
♥ Do have faith in what you're doing.