Cover

欢迎来到永生的主页!

精彩即将呈现,请稍候...

Nginx+Gunicorn+Django 在centos 7搭建网站(虚拟环境版)

Nginx+Gunicorn+Django 在centos 7搭建网站(虚拟环境版)

  需要工具:     1.mysql 8.0     2.python 3.11.0         库(gunicor...

阅读全文 »
django-CKeditor添加mathjax数学公式、代码高亮和前端不显示总结

django-CKeditor添加mathjax数学公式、代码高亮和前端不显示总结

1.配置mathjax 需要的插件分别是  widget, dialog, mathjax ①添加插件②        'mathJaxLib': '//cdn.mathjax.org/mathjax/2.6-la...

阅读全文 »
re — 正则表达式操作(python3.7版)

re — 正则表达式操作(python3.7版)

这个模块提供了与 Perl 语言类似的正则表达式匹配操作。 模式和被搜索的字符串既可以是 Unicode 字符串 (str) ,也可以是8位字节串 (bytes)。 但是,Unicode 字符串与8位字节串不能混用:也就是说,你不能用一个字节串模式去匹配 Unicode 字符串,反之亦然;类似...

阅读全文 »
用python代码模拟键盘输入

用python代码模拟键盘输入

今天在写代码时遇到一种情况,代码只能通过外部操作来判断,这时我就想到用python的代码来模拟一个键盘输入的值。   首先需要配置一下环境,pywin安装模块:http://sourceforge.net/projects/pywin32/files/ 安装好,就可以直接...

阅读全文 »
pyinstaller打包

pyinstaller打包

  环境:win10, python 3.7.6 (32位) 注1:64位python打包可能有bug 注2:打包如果过大,可以用虚拟环境pipenv打包,可能缩小几十兆 1. 普通打包 1.安装pyinstaller pip install pyins...

阅读全文 »
DJANGO 项目中的 FAVICON.ICO 处理

DJANGO 项目中的 FAVICON.ICO 处理

  1.引入模块: from django.views.generic.base import RedirectView 2.设置 主URL, 重定向: urlpatterns = [     path("favicon.ico",RedirectVi...

阅读全文 »
Django 富文本CKEditor、Prism

Django 富文本CKEditor、Prism

主要内容:
在前台使用Ckeditor
阅读全文 »
安卓模拟器

安卓模拟器

1.雷电模拟器的python代码 import datetime import os import random import shutil import time from xml.dom.minidom import parseString import socket i...

阅读全文 »
django允许外部访问

django允许外部访问

1关闭防火墙 service iptables stop 1 2设置django 开开启django时,使用0.0.0.0:xxxx,作为ip和端口例如:python manage.py runserver 0.0.0.0:9000然后在sett...

阅读全文 »

Python 基础和pycharm

主要内容:
第一个 Python 程序
实例
Python 标识符
Python 保留字符
行和缩进
阅读全文 »
122 篇文章,当前 12 / 13