08 2023 档案
摘要:#### 1. django-simple-captcha 下载 `pip install django-simple-captcha` #### 2. 配置 ##### 2.1 settings.py 配置 ```python # 注册 app INSTALLED_APPS = [ .... 'c
阅读全文
摘要:#### admin.py 后台管理界面修改密码 ```python from django.contrib import admin from django.contrib.auth.hashers import make_password from django.http import Http
阅读全文
摘要:#### 1. 取最大值, 最小值, 平均值 ```python df.max() df.iloc[:, 1:].max() df.min() df.mean() # 输出 index value ``` #### 2. 生成 空值, 带index的 series ```python pd.Seri
阅读全文
摘要:```python from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger def main(object_list, page_index, display_num=10): """ :param objec
阅读全文
摘要:#### 1. GET请求 ```python # query请求 def get(self, request): print(request.GET) res = [] # 最终返回的结果集合 search_field = request.GET.get('search_field', '') p
阅读全文