function django doing what

while 与do while的区别

do....while 与while 的区别 while 先判断后执行,do while是先执行后判断 do while 总是保证循环体会被至少执行一次 public static void main(String[] args) { int a =0; while (a <0){ System.o ......
while

django项目中存在多个app时models 表没有创建成功

场景 使用django 创建的项目,项目下有多个app,在第二个app中的models中创建表,执行生成表的命令没有生效。 解决 #1、执行命令需要指定app名称 python manage.py makemigrations --empty team # team 为app名称 #2、 再次正常运 ......
多个 项目 django models app

to do list

to do list 线性基 \(at\&cf\) 的思维训练 \(dp\) 训练 容斥技巧 贪心训练 冷门算法:\(kruskal\) 重构树等 积累一些技巧 网络流的一些定理:\(hall\) 定理 \(\&\;dilworth\) 定理 联考课件 ......
list to do

django练手系列(三):创建第一个视图、第一个网页、和第一条路由,让项目先运转起来

1、创建第一个网页 在templates文件夹上点击鼠标右键,重构、移动目录,把templates文件夹移动到app目录下面。在templates文件夹上点击鼠标右键,新建 HTML文件 文件名称为index。HTML文件的内容如下: 点击查看代码 <!DOCTYPE html> <html lan ......
视图 路由 网页 项目 django

python Django项目在jenkins中部署

1.在jenkins中创建一个自由风格的job: 配置git源代码仓库: 构建机制的配置: 配置执行shell脚本: ps -ef | grep 0.0.0.0:8088 | grep -v grep | awk '{print $2}' | xargs kill -9echo " Finish t ......
jenkins 项目 python Django

django练手系列(二):使用pycharm,创建第一个网页

一、修改settings.py文件 在左侧项目目录树中,找到settings.py文件,双击打开。修改其中的一些配置信息。 1、ALLOWED_HOSTS = ['*'] #这一项控制项目的可访问地址,配置为['*']表示所有地址都可以访问; 2、DEBUG = True #这一项控制项目的调式模式 ......
pycharm 网页 django

Django报错 (django.core.exceptions.ImproperlyConfigured)

报错种类 django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.Did you install mysqlclient 解决方案: 1、按照mysql包 pip3 install -i http://pip ......

django练手系列(一):使用pycharm,新建一个django项目

学习django有一段时间了。今天开始在园子记录一个django项目从0-1的过程。 一. 开发环境介绍: 操作系统:Windows 10 专业版; python版本:3.11; pycharm版本:PyCharm 2023.1.3 (Professional Edition); 4.django版 ......
django pycharm 项目

Git- Fatal: cannot do a partial commit during a merge

在提交单个文件的时候出现这个错误. 意思是不能部分提交代码. 原因是git认为你有部分代码没有做好提交的准备, 比如没有添加 解决方法是 1. 提交全部 git commit -a 2. 如果不想提交全部,那么可以通过添加 -i 选项 git commit file/to/path -i -m me ......
partial cannot commit during Fatal

初学django的网络资源

https://tutorial.djangogirls.org/zh/ https://www.bilibili.com/video/BV15p4y1j7hM/ https://www.django.cn/article/show-33.html https://www.shouce.ren/ap ......
网络资源 django 资源 网络

微信小程序从django后端获取数据、获取登录用户名

关键词:微信小程序、从后端获取数据、django后端、传递登录用户名、获取当前登录用户名 /** * 生命周期函数--监听页面加载 */ onLoad(options) { let user=wx.getStorageSync('user'); var username=user.nickName; ......
用户名 程序 数据 用户 django

django-rest-framework搭建平台实战教程四-使用fast-crud集成后端权限功能

FastCrud (简称fs) 是基于Vue3的面向配置的crud开发框架,快速开发crud功能,可作为低代码平台的基础框架。 安装并启动项目 参考http://fast-crud.docmirror.cn/guide/start/demo.html 我用的是fs-admin-element .en ......

django中使用事务的几种方法

django中使用开启事务的三种方式 一.全局开启事务 # settings.py DATABASES = { 'default': { #全局开启事务,绑定的是http请求响应整个过程 'ATOMIC_REQUESTS': True, } } # 局部禁用 from django.db impor ......
事务 方法 django

django 如何在apps目录创建应用

django-admin startapp 命令创建应用时, 默认保存在当前目录, 不过可以带一个路径参数 先查看一下帮助信息django-admin startapp -h usage: django-admin startapp [-h] [--template TEMPLATE] [--ext ......
目录 django apps

Vue + Django 使用wangeditor 上传图片 显示跨域报错

报错: newsDetailed:1 Access to XMLHttpRequest at 'http://www.py32api.com:8000/users/uploadFile/' from origin 'http://localhost:8080' has been blocked by ......
wangeditor Django 图片 Vue

django验证码插件 --- django-simple-captcha

使用django-simple-captcha实现登录验证码: 第一步:安装pillow依赖 pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple/ 第二步:安装django-simple-captcha pip install ......

django+vue实现文件夹上传

最近学django的文件上下传,网上的文件夹上下传压根没有,找了好几个,报错一大堆,没有一个能用,花里胡哨,可气!!!下面这个方法是我刚刚用过的,分享给大家。 前端vue非常简单,template部分 <input type="file" id="twos" webkitdirectory/><el ......
文件夹 文件 django vue

【Django】加密 settings.py文件中的数据库密码

1. 使用 from cryptography.fernet import Fernet 第三方库 pip3 install cryptography 2. Fernet的使用 from cryptography.fernet import Fernet # 生成加密密钥 key = Fernet. ......
settings 密码 数据库 文件 数据

What do you think of Crazy Shopping on Novermber?

What do you think of Crazy Shopping on Novermber? As an AI language model, I do not have personal opinions or feelings about shopping on November or a ......
Novermber Shopping Crazy think What

How can I do to protect the Environmental

How can I do to protect the Environmental Protecting the environment is an important responsibility that we all share. Here are some simple steps you ......
Environmental protect How can the

What do you think of Online and Classroom Class advantages and disadvantages?

What do you think of Online and Classroom Class advantages and disadvantages? Online and classroom classes each have their own set of advantages and d ......

Do cars need smart devices?

Smart devices are becoming increasingly common in modern cars, and they can provide several benefits for drivers. However, whether or not cars need sm ......
devices smart cars need Do

(三)Django Admin管理工具

Django Admin 管理工具 一、简介 # 1、Django新建项目的同时自动创建admin模块,在settings.py中INSTALLED_APPS的模块中就可以看到django.contrib开头的模块 # 2、 二、使用 ......
管理工具 工具 Django Admin

【Azure Function App】本地运行的Function发布到Azure上无法运行的错误分析

Starting Host (HostId=funapp-xxx-dev, Version=1.0.20776.0, InstanceId=xxx-x-xx-x-xxx, ProcessId=7924, AppDomainId=2, Debug=True, ConsecutiveErrors=0, ... ......
Function Azure 错误 App

django中session的使用

1 session存在于服务端的键值对 2 同一个浏览器不允许登录多个账户,不同浏览器可以登录同一个账户 3 session的使用(必须迁移数据) -增:request.session['name']=lqz -查:request.session['name'] -改:request.session ......
session django

django中cookie的使用

cookie是在客户端的键值对 # 0 会话跟踪,会话保持# 1 cookie规范 -记住:当前网站在浏览器上cookie个数和大小有限制 -Cookie大小上限为4KB; -一个服务器最多在客户端浏览器上保存20个Cookie; -一个浏览器最多保存300个Cookie;# 2 django中操作 ......
django cookie

Sum of XOR Functions 题解

题意 给定一个数 \(n\) 和一个包含 \(n\) 个数的序列 \(a\),求出以下式子模 \(998244353\) 的值: \(\sum_{i=1}^{n}\sum_{j=i}^{n} f(i,j)\times (j-i+1)\)。 其中 \(f(i,j)\) 的值为 \(a_{i}\oplu ......
题解 Functions Sum XOR of

P8386 [PA2021] Od deski do deski 题解

显然是一道计数 dp。 dp 状态应该是最难的一部分了,个人认为这种状态设计得比较巧妙。如果像我刚开始一样设 \(dp_{i,j}\) 表示序列中一共有 \(i\) 个数,序列最后一个数为 \(j\) 的合法方案数的话,那么方程就会变得很不好转移,因为我们不知道当前的 \(j\) 和之前的某些数能不 ......
题解 deski P8386 8386 2021

To do list

计划按周来计,算法和补题是长期。 计划(一) AT & CF 近几场补题 主页杂题 思维题 算法(二) 网络流 线性基 主席树 莫队 平衡树 树套树 根号分治 启发式合并 ODT 分块 补题(三) \(\text{NOIp}\) 改错,11.22 模拟赛 CD 题,11.27 模拟赛 D 题,12. ......
list To do

P1464 Function(记忆化搜索)(宏定义)

P1464 Function 记忆化搜索(引用洛谷上题解的原话,自己是个废物想不到): 只要确定好数组和范围就可以把搜索中的每一次结果存起来, 正在搜索的项目中也可以用到这些信息 。 这便是记忆化搜索的核心与关键:自定义函数与数组达到“实时互动的状态”。 好处 通过数组直接记录值,减少重复递归过程来 ......
Function 记忆 P1464 1464
共1890篇  :3/63页 首页上一页3下一页尾页