Django catch-all URL without breaking APPEND_SLASH

后端 未结 2 846
醉话见心
醉话见心 2020-12-29 03:20

I have an entry in my urls.py that acts as a catch-all which loads a simple view if it finds an appropriate page in the database. The problem with this approach is that the

2条回答
  •  灰色年华
    2020-12-29 04:10

    The statement if it finds an appropriate static page in the database seems like your static pages are not quite static so, you either pass your links through urls.py (just like you do now), or you extract those pages from the DB, put them in a directory and configure that directory as one for serving static files

提交回复
热议问题