Django: Arbitrary number of unnamed urls.py parameters

前端 未结 5 2106
面向向阳花
面向向阳花 2020-12-31 02:35

I have a Django model with a large number of fields and 20000+ table rows. To facilitate human readable URLs and the ability to break down the large list into arbitrary sub

5条回答
  •  北海茫月
    2020-12-31 03:06

    I agree with Adam, but I think the pattern in urls.py should be:

    ... r'^browse/(?P.+)/$' ...
    

    The '\w' will only match 'word' characters, but the '.' will match anything.

提交回复
热议问题