资源说明:一个middleware的例子
import time
from django.urls import reverse
from django.utils.deprecation import MiddlewareMixin
class TimeItMiddleware(MiddlewareMixin):
def process_request(self, request):
return
def process_view(self, request, func, *args, **kwargs):
if request.path != reverse('index'
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。