Django url problem parameter set

Here Insert Picture Description
ListView class view with the same function, since 1at no arguments, it does not complain,
2at a given parameter, but if this parameter to add a restriction that is to become slug:slug'll get an error
reason is ListViewthe return of all eligible query object, then add restrictions, when the flip, the object type is not the return of slugthe type of error it will be,

It suggested adding restrictions, but should also consider the actual situation

Published 141 original articles · won praise 131 · views 210 000 +

Guess you like

Origin blog.csdn.net/qq_41621362/article/details/102896403