推荐学习书目
› 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 · 2388 views
    This topic created in 3369 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   ·   Privacy   ·   Solana   ·   1207 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 17:16 · PVG 01:16 · LAX 10:16 · JFK 13:16
    ♥ Do have faith in what you're doing.