摘要: 代码: from django.utils.safestring import mark_safe class Paginator(object): def __init__(self,current_page,total_item_count,base_url,per_page_count=10, 阅读全文
posted @ 2017-09-21 15:04 renpingsheng 阅读(1612) 评论(0) 推荐(0)
摘要: Django中提供了"信号调度",用于在框架执行操作时解耦. 一些动作发生的时候,系统会根据信号定义的函数执行相应的操作 Django中内置的signal Model_signals pre_init Django中的model对象执行其构造方法前,自动触发 post_init Django中的mo 阅读全文
posted @ 2017-09-21 08:20 renpingsheng 阅读(9503) 评论(0) 推荐(5)