推荐学习书目
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
xiayibu
V2EX  ›  Python

谁知道 django 如何设置 分页的第一页和其他页使用不同的 html 模板

  •  
  •   xiayibu · Jul 5, 2017 · 2164 views
    This topic created in 3265 days ago, the information mentioned may be changed or developed.
    2 replies    2017-07-05 13:08:50 +08:00
    LeoQ
        1
    LeoQ  
       Jul 5, 2017 via iPhone
    1. urls 里面配置正则匹配,第一页和后面配置不同的 view
    2. view 里判断页号,返回不同的模板

    问问题前思考下好吗?
    NaVient
        2
    NaVient  
       Jul 5, 2017
    那要看你是后端分页还是前端分页
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2321 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 00:31 · PVG 08:31 · LAX 17:31 · JFK 20:31
    ♥ Do have faith in what you're doing.