阅读背景:

Django为对象定义get_create_url()、get_update_url()和get_delete_url()是否有意义

来源:互联网 

Every object which have unique url should have get_absolute_url() which usually returns detail view of the object. Often those kind of objects also have create, update and delete views and urls need some parameters to work. You can provide parameters to those urls in your templates but if you ever change your url structure etc. you have to change all your templates also instead of that one function. So: Every object which have unique url should have




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: