django 2.0最新版 urls 不支持正则表达式问题

Django集成Okta实战:OIDC认证体系重构与避坑指南 OpenID Connect(OIDC)是现代Web应用实现安全单点登录(SSO)的核心协议,其本质是一套基于OAuth2扩展的身份认证状态机,涵盖授权码流程、PKCE防护、ID Token签名验证与用户声明(Claims)映射等关键机制。采用OIDC对接Okta等专业身份云,可替代Django原生auth模块,实现企业级身份生命周期管理、多租户权限治理与合规审计支撑。技术价值在于解耦认证(AuthN)与授权(AuthZ),让Django专注业务权限执行,而Okta承担可信身份断言。典型应用场景包括SaaS 阅读详情

django最新版url默认不支持正则,标准格式:

path('admin/', admin.site.urls),

如果需要使用正则,需要导入:re_path,使用方法:

from django.urls import path,re_path
urlpatterns = [
    path('admin/', admin.site.urls),
    re_path(r'^test-(\d+)-(\d+)/', views.test),
    path('index/', views.index),
]

示例:

1.urls.py

urlpatterns = [
    path('admin/', admin.site.urls),
    #re_path(r'^test-(\d+)-(\d+)/', views.test), #普通写法,函数参数必须严格按照顺序获取数值
    re_path(r'^test-(?P<v1>\d+)-(?P<v2>\d+)/', views.test), #分组写法,函数参数可以随意调换位置
    path('index/', views.index),
]

2.views.py

#第一种写法,严格按照顺序获取参数值
# def test(request,v1,v2):
#     print(v1,v2)
#     return render(request,"index.html")

#第二种写法,按照key获取value,参数只能是两个
# def test(request,v2,v1):
#     print(v1,v2)
#     return render(request,"index.html")

#第三种写法,**kwargs可以获取多个键值对
# **kwargs获取字典的值,*args获取元组的值
def test(request,*args,**kwargs):
    for k,v in kwargs.items():
        temp = int(v)
        kwargs[k]=temp
        if temp:
            print(temp)
    print(kwargs)
    print("v1",kwargs["v1"])
    print("v2",kwargs["v2"])
    return render(request,"index.html")

def index(request):
    return render(request,"index.html")

3.Templates

<p><a href="/test-3-2">点我测试url1</a></p>
<p><a href="/test-3-1">点我测试url2</a></p>
<p><a href="/test-5-6">点我测试url3</a></p>

4.执行结果:

3 2
[04/Dec/2018 22:41:44] "GET /test-3-2/ HTTP/1.1" 200 269
3 1
[04/Dec/2018 22:41:48] "GET /test-3-1/ HTTP/1.1" 200 269
5 6
[04/Dec/2018 22:41:49] "GET /test-5-6/ HTTP/1.1" 200 269
{'v1': 5, 'v2': 6}
v1 5
v2 6
[04/Dec/2018 23:05:09] "GET /test-5-6/ HTTP/1.1" 200 269
 

views获取值的三种写法:

#第一种写法,严格按照顺序获取参数值
# def test(request,v1,v2):
#     print(v1,v2)
#     return render(request,"index.html")

#第二种写法,按照key获取value,参数只能是两个
# def test(request,v2,v1):
#     print(v1,v2)
#     return render(request,"index.html")

#第三种写法,**kwargs可以获取多个键值对
# **kwargs获取字典的值,*args获取元组的值
def test(request,*args,**kwargs):
    for k,v in kwargs.items():
        temp = int(v)
        kwargs[k]=temp
        if temp:
            print(temp)
    print(kwargs)
    print("v1",kwargs["v1"])
    print("v2",kwargs["v2"])
    return render(request,"index.html")

def index(request):
    return render(request,"index.html")
Django生产部署:Apache + mod_wsgi 实战指南 WSGI(Web Server Gateway Interface)是Python Web应用与服务器通信的标准协议,其核心价值在于解耦应用逻辑与HTTP服务层。mod_wsgi作为Apache官方推荐的WSGI实现,通过守护进程模式提供进程隔离、内存管理与优雅重启能力,显著提升Django等框架的生产健壮性。相比开发服务器runserver的单线程局限,或Nginx+uWSGI的多组件架构,Apache+mod_wsgi方案在LAMP运维体系中具备配置统一、日志集中、安全模块(如mod_security) 阅读详情

相关推荐

Django(part4)--练习及re_path方法

学习笔记,仅供参考 文章目录练习1需求re_path方法实现需求练习2需求实现需求 练习1 需求 输入的访问地址为: http://127.0.0.1:8000/year/2018 http://127.0.0.1:8000/year/2019 http://127.0.0.1:8000/year/四位数年份 得到的网页的响应内容为: 输入年份为:2018 输入年份为:2019 输入年份为:四位数年份; 我们看到,在这里需要用正则表达式去匹配年份,由于path函数不支持正则表达式,所以,我们需要

小山羊的学习日志 596

关于用正则表达式判定url链接,并排除汉字

- (BOOL)urlValidation:(NSString *)string {     NSError *error;     // 正则1     NSString *regulaStr =@"\\bhttps?://[a-zA-Z0-9\\-.]+(?::(\\d+))?(?:(?:/[a-zA-Z0-9\\-._?,'+\\&%$=~*!():@\\\\]*)+)?"

ss_aa_aa的博客 3907

基于Hive与Django的电商评论情感分析系统设计与实现

在大数据与人工智能融合的背景下,情感分析已成为自然语言处理领域的重要分支,旨在从用户生成的评论文本中自动识别观点倾向。其核心原理通常依赖特征提取与分类模型,如TF-IDF配合朴素贝叶斯等算法,能够在海量文本中高效判别正面与负面情绪。在工程实践中,将离线数据仓库与在线Web服务相结合,可以构建完整的数据分析链路:使用Hive对电商评论进行批量清洗与特征统计,再由机器学习模型训练情感分类器,最终通过Django框架封装为可视化系统,使用户直观查看商品口碑分布与趋势。这种“存储+算法+展示”的三层架构,不仅适合毕

weixin_30021053的博客 317

新版本的django中正则表达式引入的解决

在新版本的django中,path替代了原来的url,默认使用正则是不支持的,需要导入re_path使用正则。

Jeromeyoung 963

深圳SILAS(智能融合低空系统)无人机调度系统介绍

一、系统定位与核心目标SILAS(Smart Integrated Lower Airspace System)是深圳市为低空经济打造的“数字大脑”,由粤港澳大湾区数字经济研究院自主研发,定位为城市级低空飞行智能调度与管理平台。核心目标是解决低空经济中“高密度、高复杂度、多主体”的飞行调度难题,实现空域资源的高效分配、飞行安全的智能监管及全场景服务的无缝协同,支撑深圳从“无人机之都”向“天空之城”升级。二、核心架构:低空基础设施“四张网”设施网。

主攻大数据 人工智能 物联网 安全 低空经济等方向。mtsc 、gtest特邀分享嘉宾 3739

5G协议栈逆向工程:基于开源模拟器的核心网信令分析实战

本文详细介绍了基于开源模拟器Free5GC和UERANSIM的5G协议栈逆向工程实战,涵盖核心网信令分析、环境搭建、认证协议解析及安全漏洞验证。通过NGAP/NAS信令交互解密和异常流量注入测试,帮助研究人员深入理解5G网络安全机制,并提供实用的安全加固建议。

weixin_29250573的博客 671

Django中url的正则表达式错误

WARNINGS:?: (2_0.W001) Your URL pattern '^$/' [name='index'] has a route that contains '(?P&lt;', begins with a '^', or ends with a '$'. This was likely an oversight when migrating to django.urls.pa...

嵌入式软件开发交流 3万+

手把手教你用Apple Developer App完成苹果开发者账号注册(含证件验证失败解决方案)

本文详细指导如何通过Apple Developer App完成苹果开发者账号注册,特别针对证件验证失败问题提供解决方案。从准备工作到注册流程,再到验证失败的处理方法,帮助开发者顺利完成注册,避免常见错误。

moss5的博客 1156

Django2.0 path与Django1.x版本url正则匹配问题

2.0内的path匹配正则时候无效,导入re_path即可匹配正则

endless_lover的博客 5852

2019年数学建模美赛经验总结

北京时间2019年1月29号上午9时,数模美赛结束。美赛结束已经10多天了,我在这次竞赛中负责建模和编程,趁现在记忆还比较清晰,写下这篇博客记录第一次参加数学建模美赛的经历。 补更:2019年4月20日公布成绩,笔者最终获得了美赛一等奖 目录 1、基本情况 2、选题 3、分工合作 4、论文写作 5、建模 6、编程 7、入门资源 ...

Smallactive 7万+

最新Python爬虫实战(入门爬虫篇)——案例15:微博热搜数据采集(详细爬虫思路截图+抓包动图演示+完整爬虫代码+详细注释)

本次案例通过 Python 爬虫技术,成功实现了对微博热搜 API 接口数据的批量爬取与 Excel 保存。代码采用模块化设计,包含接口请求、JSON 解析、数据提取、Excel 持久化等完整流程;通过模拟真实浏览器的请求头和 cookies,有效规避基础反爬策略,保证请求的稳定性。整个爬虫逻辑遵循“API请求 → JSON解析 → 数据提取 → 保存到Excel”的标准流程,与异步加载类网站的爬取范式高度一致。AJAX 接口抓包与分析。

努力让自己发光,对的人才能迎着光而来 7万+

DJango2.0版本后 url正则问题

2.0后urls文件内的path好像不支持正则了  需要用正则匹配的 需要 from django.urls import re_path urlpatterns = [ re_path('index-(?P&lt;nid&gt;\d)-(?P&lt;uid&gt;\d)', views.index) } 用re_path就没有问题了...

u011410397的博客 1248

S速度曲线轨迹规划(普通变频位置闭环控制算法详细介绍+SCL代码)

位置控制用PD控制器,详细内容介绍请查看下面博客文章:PD控制器算法详细解读_RXXW_Dor的博客-优快云博客鉴于积分和微分在工程上的大量应用,这篇博文主要讲解工程上的如何求导f'(x),导数反映的是函数(信号)的变化率,牛顿也是在研究运动的时候提出了微积分的概念,我们知道反映位移变化的快慢程度是速度v(t),反映速度变化快慢程度的物理量是加速度(速度的变化率)。

RXXW_Dor的博客 3883

Django知识点之urls.py路由设置

路由系统 路由系统是把接收到的请求,根据网址进行匹配,指定处理请求的函数或类。 路由系统分类: 网站框架路由系统一般分为两类,FBV,CBV,Django两者都支持,但有的框架只支持一种。 FBV(Function Base View ): 函数基于视图,在views.py中,使用函数处理请求。 CBV(Class Base View):类基于视图,在views.py中,使用类处理请求。 UR...

甫式人生 2657

【数字孪生工业应用实战】第2篇:数字孪生系统架构设计与技术选型——从“作秀”到“实干”的骨架构建

本文系统剖析了数字孪生系统从“作秀”到“实干”的架构设计关键。针对多数项目在POC转生产时因架构混乱、选型盲目而失败的问题,深入阐述了四层分层架构(感知层、传输层、模型层、应用层)的设计原则,重点解析了感知层的异构适配与边缘预处理、传输层的异步解耦与多模式通信等工程细节。结合OPC UA、MQTT、EdgeX Foundry等主流技术选型对比,以及汽车焊装车间边缘智能网关的实战代码,提供了从零搭建微型孪生系统的完整指导。旨在帮助工程师建立清晰的选型决策逻辑,构建稳定、可演进的数字孪生“骨架”。

专注于人工智能、软件开发、工控自动化、工厂数字化及智能化等领域,希望和大家共同进步! 264

Monorepo与pnpm:前端项目管理的完美搭档

pnpm又称 performant npm,翻译过来就是高性能的npm。Monorepo是一种项目开发与管理的策略模式,它代表"单一代码仓库"(Monolithic Repository)。在Monorepo模式中,所有相关的项目和组件都被存储在一个统一的代码仓库中,而不是分散在多个独立的代码仓库中,这些项目之间还可能会有依赖关系。

m0_68271787的博客 2560

django的相关问题解决

问题一:django在models生成数据库表的时候报错如下: 原因:django2.0后,定义外键和一对一关系的时候需要加on_delete选项,此参数为了避免两个表里的数据不一致问题,不然会报错 解决方案:在上边的错误中显示line 43,修改43行内容,添加内容on_delete=models.CASCADE 问题二:django最新版的urls.py不支持正则表达式 ...

白开水不加糖 280

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Diango: urls.py无法添加正则表达式的解决方案

一、问题 在配置urls.py文件时,添加正则表达式之后,网页出现无法404错误,代码如下: from django.contrib import admin from django.urls import path from . import views urlpatterns = [ path('admin/', admin.site.urls), path...

qq_41297934的博客 480

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Django框架学习5--urls.py配置规则

1.url配置规则:各个版本支持的不同 path 只能绝对匹配路径地址,不支持正则匹配 re_path 支持正则匹配,django 1.x版本常用 url 支持正则匹配,实际上就是return re_path, django2.x版本推荐 2.通过url获取参数 平常我们访问页面时经常有这样的url:http://127.0.0.1:8000/hello/page=1, 这样带参数的ur...

铁马冰河入梦来 1672

廖雪峰Python教程[完整版]

廖雪峰的python教程整理的,已经排好版了,而且还是完整的,适合小白

Django2.0以后的版本在部署时报错django.core.exceptions.ImproperlyConfigured: Passing a 3-tuple to include() ....

这是由于在django2.0后不支持使用在urls.py中写 url(r'^admin/', include(admin.site.urls)) ,直接用 path('admin/', admin.site.urls), 对于应用中自定义urls.py文件的引用还是需要使用include() ...

舍硪齐誰 9409

Django知识-04

路由层(urls.py)、无名分组、有名分组、反向解析、路由分发、名称空间(了解)、伪静态的概念(了解)、虚拟环境(了解)、django1和django2的区别

zhoujiajia的博客 180

Django2.0 path与Django1.x url的总结

我理解的path就是跟简单的url路由语法。那么简单的地方在哪呢? 在我写出这行代码时 path(&quot;r'^articles/2003/$',views.special_2003&quot;) 产生了以下错误 .经过查找发现path不支持正则匹配。只有这样写才是对的 from django.conf.urls import urlurl(r'^articles/2003/$',views.special...

liu0yun的博客 348

【Django】入门 | urls.py | views.py | models数据库

基础 ...\> py -m django --version

Marianas Trench 1696

165. django版本更新导致的问题

摘要:本文记录罗列了在django使用过程中,因为django2.x版本和旧版本改进后部分旧代码运行过程中出现的错误以及解决方法,相关解决方法见参考文献。

王亚星的编程学习园地 1251

Django框架整理

Django是一个功能强大的web框架。 前言:框架模式简介 1、MVC和MTV框架模式:分层级进行管理 说到框架模式我们有必要简单的说下设计模式,了解下设计模式这个概念,因为有人对设计模式和框架模式的概念经常混淆 设计模式: 是一套被反复使用,多数人知道并经过分类的代码设计经验总结,是为了解决一些通用性问题的 目的:重用代码并保证代码的可靠性 设计模式分类:单例,抽象工厂 等等 23种模式 一句话总结:解

有用的话关个注,点个赞,收个藏🫶。 1713

Django之路由层、视图层、模板层介绍

一、Django请求生命周期 1.路由层urls.py Django 1.11版本 URLConf官方文档 1.1 urls.py配置基本格式 from django.conf.urls import url urlpatterns = [ url(正则表达式, views视图函数,参数,别名), ] 1.11.x版本默认 from...

LYNN0068的博客 341
上一篇: django 自定义中间件 完成用户登录(类似java面向切面)
下一篇: waterfull效果
路路的小豆
博客等级 码龄10年 1763粉丝 99原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值