上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 99 下一页
摘要: 很多时候我们需要使用telnet命令,ping端口通不通,所以得先安装下系统自带的telnet工具。 telnet工具日常还是非常好用的。 如果未安装则会提示: 'telnet' 不是内部或外部命令,也不是可运行的程序或批处理文件。 下面介绍两种方式,一个是老的操作方式,在"控制面板"中安装,另一个 阅读全文
posted @ 2023-06-15 08:51 Oops!# 阅读(1420) 评论(0) 推荐(0) 编辑
摘要: 1. npm安装 下载node.js: nodejs.org/en/download… 命令行下输入: npm -v 验证是否安装成功。 2. cnpm安装 安装命令: npm install -g cnpm --registry=https://registry.npm.taobao.org 命令 阅读全文
posted @ 2023-06-12 13:59 Oops!# 阅读(123) 评论(0) 推荐(0) 编辑
摘要: REST framework中的序列化类与Django的Form和ModelForm类非常相似。我们提供了一个Serializer类,它提供了一种强大的通用方法来控制响应的输出,以及一个ModelSerializer类,它为创建处理模型实例和查询集的序列化提供了有效的快捷方式。 Serializer 阅读全文
posted @ 2023-06-12 09:57 Oops!# 阅读(15) 评论(0) 推荐(0) 编辑
摘要: Image by author It’s the day before my fast API live stream. I decided to create a guide for the stream and turn it into a blog post. So, here it is. 阅读全文
posted @ 2023-06-10 18:05 Oops!# 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 1、在settings.py文件中配置数据库 ,需要提前创建好库,并注册app【python manage.py startapp login 提前创建一个名为"login "的app应用】 2、在login文件夹的models.py中创建一个User表 3. 安装pymysql pip insta 阅读全文
posted @ 2023-06-09 16:41 Oops!# 阅读(100) 评论(0) 推荐(0) 编辑
摘要: Some functions are hard as well as boring to code each and every time. But Django users don’t have to worry about that because Django has some awesome 阅读全文
posted @ 2023-06-08 14:42 Oops!# 阅读(9) 评论(0) 推荐(0) 编辑
摘要: This setup is working for me, maybe it will help you. It is for latest version of Django. Many answers in OS are for older Django versions. URLS: from 阅读全文
posted @ 2023-06-02 16:15 Oops!# 阅读(48) 评论(0) 推荐(0) 编辑
摘要: If the value is not 1, '1', or an object of length 1, the pluralize filter outputs an “s” or the value of the suffix argument if one is used. Variable 阅读全文
posted @ 2023-05-30 09:31 Oops!# 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 创建 Django DeleteView 类 DjangoDeleteView类允许您定义基于类的视图,该视图显示确认页面并删除现有对象。 如果 HTTP 请求方法是GET,DeleteView视图将显示确认页面。但是,如果请求是POST,DeleteView视图将删除该对象。 要使用该类Delet 阅读全文
posted @ 2023-05-29 16:24 Oops!# 阅读(32) 评论(0) 推荐(0) 编辑
摘要: Django中的reverse_lazy函数可以用于反向解析URL,即根据视图函数的名称和参数生成对应的URL。 要使用带有参数的reverse_lazy函数,可以将参数作为关键字参数传递给它。例如,假设我们有以下的URLconf配置: javascript 复制代码 from django.url 阅读全文
posted @ 2023-05-29 15:46 Oops!# 阅读(93) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 99 下一页