django动态路由配置

url(r'^time/plus/(\d{1,2})/$', hours_ahead),

def hours_ahead(request, offset):
	    offset = int(offset)
	    dt = datetime.datetime.now() + datetime.timedelta(hours=offset)

参考:
https://blog.csdn.net/uwenhao2008/article/details/80692029

你可能感兴趣的:(python,django,django,python,后端)