摘要:
一主轴方向、默认横线排布 flex-row(默认)。flex-column是竖向排列 <div class="d-flex "> <div class="p-2 bg-primary text-white">Item 1</div> <div class="p-2 bg-success text-w
阅读全文
posted @ 2025-09-15 10:58
花生与酒
阅读(2)
推荐(0)
摘要:
背景:下面是学校 、 班级 、学生表 学校 5个校 班级 3所校,各有3个班级 学生 3个校的第1个班级,才有学生 1、查询所有班的学生数 SELECT b.id, b.name, COUNT(s.id) as student_countFROM t_ban bLEFT JOIN t_stu s O
阅读全文
posted @ 2025-09-10 16:18
花生与酒
阅读(1)
推荐(0)
posted @ 2025-08-15 14:35
花生与酒
阅读(9)
推荐(0)
摘要:
In Django, you can retrieve data from a request using either request.POST or request.body, depending on the content type of the request and how the da
阅读全文
posted @ 2024-09-05 17:46
花生与酒
阅读(35)
推荐(0)
摘要:
1. 使用媒体创建工具创建 Windows 10 可启动 USB 先到 :https://www.microsoft.com/en-in/software-download/windows10 下载安装,然后运行 准备一个大的u盘,插入 启动U盘制成后, 把电脑改成u盘启动,然后安装即可
阅读全文
posted @ 2024-07-24 17:15
花生与酒
阅读(20)
推荐(0)
摘要:
https://www.sassy-blog.com/entry/20210714/1626230852 pip install django-maintenance-mode setting.pyの設定 INSTALLED_APPS = [ 'maintenance_mode', ] MIDDLE
阅读全文
posted @ 2024-07-23 10:40
花生与酒
阅读(9)
推荐(0)
摘要:
10.20.59.2的postgres密码是:Lxg@123456 修改方法: 打开任意一个查询: ALTER USER your_username PASSWORD 'new_password'; 经常出现no space left等问题 53100: could not resize share
阅读全文
posted @ 2024-07-09 15:25
花生与酒
阅读(61)
推荐(0)
摘要:
Celery is a distributed task queue system that can be used with Django to perform asynchronous tasks such as sending emails, processing background job
阅读全文
posted @ 2024-03-07 10:48
花生与酒
阅读(35)
推荐(0)
摘要:
Start a project django-admin startproject registrationForm Project directory registration/settings.py # Application definitionINSTALLED_APPS = [ 'djan
阅读全文
posted @ 2024-03-07 10:38
花生与酒
阅读(62)
推荐(0)
摘要:
select STRING_AGG(schooltypeno,',') from dm.codeschooltype where schooltypeno like '36%' 361,367,369,363,365,364,362,366 select tablename, case when s
阅读全文
posted @ 2024-03-04 11:01
花生与酒
阅读(19)
推荐(0)
摘要:
Launching a website can be an exciting but nerve-wracking experience. With so many moving parts in the website development process, it’s easy to overl
阅读全文
posted @ 2024-01-09 14:27
花生与酒
阅读(17)
推荐(0)
摘要:
model定义 class Article(models.Model): userid = models.ForeignKey(User, null=True, blank=True, verbose_name='登陆人',on_delete=models.CASCADE) avatar = mod
阅读全文
posted @ 2023-09-15 10:26
花生与酒
阅读(13)
推荐(0)
摘要:
https://ordinarycoders.com/blog/article/render-forms-with-django-crispy-forms pip install django-crispy-forms in your Django project add crispy_forms
阅读全文
posted @ 2023-09-13 14:19
花生与酒
阅读(48)
推荐(0)
摘要:
https://requests.readthedocs.io/projects/requests-html/en/latest/ 非常好的教程:https://www.jcchouinard.com/web-scraping-with-python-and-requests-html/#Extra
阅读全文
posted @ 2023-09-12 14:30
花生与酒
阅读(26)
推荐(0)
摘要:
1、找到文件\site-packages\mdeditor\templates\markdown.html文件 2、找到<script type="text/javascript">这行 3. 这行及以下所有内容删除,也就是把js这块代码全删除了,把js替换 <script type="text/j
阅读全文
posted @ 2023-09-12 09:37
花生与酒
阅读(150)
推荐(0)
摘要:
Update View refers to a view (logic) to update a particular instance of a table from the database with some extra details. It is used to update entrie
阅读全文
posted @ 2023-09-06 17:40
花生与酒
阅读(29)
推荐(0)
摘要:
这个插件已经再tryformset/product中引入了js等。 但尚未实验实现。
阅读全文
posted @ 2023-09-06 11:13
花生与酒
阅读(14)
推荐(0)
摘要:
https://docs.djangoproject.com/en/4.2/ref/forms/widgets/ 所有的widget class Item(models.Model): YEAR_CHOICES = ( (10, '10代'), (20, '20代'), (30, '30代'), (
阅读全文
posted @ 2023-09-01 16:19
花生与酒
阅读(70)
推荐(0)
摘要:
一、定义model时,使用校验 検証内容バリデーションクラス 正規表現によるチェック RegexValidator 最小文字数 MinLengthValidator 最大文字数 MaxLengthValidator 最小値 MinValueValidator 最大値 MaxValueValidato
阅读全文
posted @ 2023-09-01 16:17
花生与酒
阅读(44)
推荐(0)
摘要:
1、托入几个矩形,当1、2级菜单 2.、 菜单全选,右键,转为动态面板,动态面板命名为一级菜单名称 3、系统管理面板,默认是状态1 ,里面有3个按钮, 状态1->改为展开, 再增加一个关闭状态 (1)双击系统管理面板, (2)新增状态 (3)把展开状态的系统管理菜单, 复制到关闭状态里 4、展开状态
阅读全文
posted @ 2023-08-23 12:00
花生与酒
阅读(412)
推荐(0)
摘要:
django-allauth 可以邮件电话登录,也可以用百度等第三方账号登录 custom user,邮件登录 https://qiita.com/Kei-Segawa/items/aa38f72fc5409a3517c6 另一个例子 https://qiita.com/t-shirayama/it
阅读全文
posted @ 2023-07-21 10:22
花生与酒
阅读(24)
推荐(0)
摘要:
https://qiita.com/skokado/items/a25d64cafa3db791b283
阅读全文
posted @ 2023-07-21 09:19
花生与酒
阅读(24)
推荐(0)
摘要:
https://qiita.com/godan09/items/13866970972bf3a1c243 PDFで見積書を出力するにあたって関連ライブラリのメリデメを洗い出してみました。 そのライブラリの中で実装方法とアウトプットを提示し、比較できる状態にしすることが本稿の目的です。 この記事は2つ
阅读全文
posted @ 2023-07-20 17:28
花生与酒
阅读(33)
推荐(0)
摘要:
querydict和普通dict区别较大 mutable=True才可以编辑,默认不可修改 >>> from django.http import QueryDict >>> qd = QueryDict('spam=1&egg=2') # get で取得すると文字列が返る >>> qd.get('
阅读全文
posted @ 2023-07-20 17:19
花生与酒
阅读(27)
推荐(0)
摘要:
How to handle multiple sites in Django: the problem Consider a set up where the same Django project has a bunch of apps that could be reached from mul
阅读全文
posted @ 2023-07-20 15:18
花生与酒
阅读(28)
推荐(0)
摘要:
検証内容バリデーションクラス 正規表現によるチェック RegexValidator 最小文字数 MinLengthValidator 最大文字数 MaxLengthValidator 最小値 MinValueValidator 最大値 MaxValueValidato class Item(mode
阅读全文
posted @ 2023-07-19 10:21
花生与酒
阅读(14)
推荐(0)
摘要:
バージョン version % pip list | grep requests #インストールしてない人は pip install requestsを実行 requests 2.28.1 % python -V Python 3.9.6 requestsモジュールができること できることはたくさん
阅读全文
posted @ 2023-07-19 10:08
花生与酒
阅读(21)
推荐(0)
摘要:
applicaton/models/user.py import uuid from django.contrib.auth.models import AbstractUser from django.contrib.auth.validators import UnicodeUsernameVa
阅读全文
posted @ 2023-07-16 11:17
花生与酒
阅读(20)
推荐(0)
摘要:
以下的例子是不可以的, obj.field obj只能是model instance,字典对象不可以 python dict_data = { 'key1': 0, 'key2': 1, } template {{ dict_data.key1 }} 对策: 编写tag custom_filter
阅读全文
posted @ 2023-07-16 11:05
花生与酒
阅读(42)
推荐(0)
摘要:
可以用来做后台任务,可以在django view中调用,当做异步任务 考核系统中要的 threading,用来异步考核结果和考核进度的统计 Python的多线程(threading)与多进程(multiprocessing )
阅读全文
posted @ 2023-07-16 10:43
花生与酒
阅读(40)
推荐(0)
摘要:
ubuntu django sudo vi django.sh #インストールのコマンドです。 sudo apt install git sudo apt-get install apache2 apache2-dev gdal-bin libgdal-dev sudo apt install li
阅读全文
posted @ 2023-07-14 10:48
花生与酒
阅读(38)
推荐(0)
摘要:
Certbotインストール bash sudo apt install certbot Nginxを停止 bash sudo systemctl stop nginx 👆をしないと、certbotで証明書を発行するときエラーになる HTTPSポート(443ポート)開放 EC2 > セキュリティ >
阅读全文
posted @ 2023-07-14 10:23
花生与酒
阅读(15)
推荐(0)
摘要:
900 是缓存900秒,sidebar_latest_posts 是缓存表示, 一般用于template的动态菜单,加载时候减少数据库访问量 {% load cache %} {% cache 900 sidebar_latest_posts %} <h3>最新文章</h3> <ul> {% for
阅读全文
posted @ 2023-07-13 17:04
花生与酒
阅读(6)
推荐(0)
摘要:
加入是 1999/10/12出生 (20230505-19991012)/10000 239493/10000 =23.9493 ≒23 import datetime today = datetime.date.today() birth = 19991012 print ((int(today.
阅读全文
posted @ 2023-07-13 15:46
花生与酒
阅读(129)
推荐(0)
摘要:
1、view和url传递参数 参数方式一: url.py path('xxx/', MailTemplateList.as_view(), name='MailTemplateList'), path('xxx/<str:id>/', MailTemplateList.as_view(), name
阅读全文
posted @ 2023-07-12 09:47
花生与酒
阅读(990)
推荐(0)
摘要:
Python Automation Scripts Examples Use Django And Selenium Django is the most popular web framework in the python world. You can use it to create a we
阅读全文
posted @ 2023-07-11 17:09
花生与酒
阅读(78)
推荐(0)
摘要:
1、推荐 oauth provider server https://pypi.org/project/django-oauth-toolkit/ django-oauth-toolkit.readthedocs.io 相关介绍: https://www.cnblogs.com/liuweida/p
阅读全文
posted @ 2023-07-11 15:18
花生与酒
阅读(140)
推荐(0)
摘要:
https://qiita.com/ANKM0/items/8fb032b6af7e64756d69 类似于这个页面 在考核系统中,我是用的 tamplate tag,关联读取显示的信息 {% if field.name == "beikao_user" %} {{ field }} {{ user
阅读全文
posted @ 2023-07-10 16:49
花生与酒
阅读(23)
推荐(0)
摘要:
中文例子和讲解: https://www.cnblogs.com/waltsmith/p/8088099.html https://realpython.com/tutorials/django/ Table of Contents Creating a Django Project Getting
阅读全文
posted @ 2023-07-10 15:41
花生与酒
阅读(72)
推荐(0)
摘要:
1、使用ModelFormSet,一般都要设定default数,方法如下 class Memo(models.Model): title = models.CharField('タイトル', max_length=20) text = models.TextField('内容') class Mem
阅读全文
posted @ 2023-07-10 10:16
花生与酒
阅读(44)
推荐(0)