原创 Tornado html生成動態pdf

from tornado import template loader = template.Loader("/user/Desktop/") # out.html 的路徑 content = loader.load("out.htm

原创 安裝 pylibmc 出錯

錯誤棧: Collecting pylibmc==1.6.0   Using cached https://files.pythonhosted.org/packages/f4/09/58b9621fc4e0433037b70f053e5

原创 Mac 安裝python虛擬環境以及指定版本的虛擬環境 virtualenv、virtualenvwrapper

1、安裝virtualenv       pip install virtualenv 2、創建一個目錄,例如:my_test_envs       mkdir my_test_envs 3、cd 到my_test_envs,創建虛擬環境

原创 mac 安裝 Adobe CC XD

Adobe CC XD 在中國區已經免費,沒什麼破解一說 1、打開網址:https://www.adobe.com/cn/products/xd.html,點擊免費獲取XD,下載 XD_Installer.dmg 2、雙擊 XD_Ins

原创 全國行政區域 json 數據

[{ "_id": "593f9c1dcf33985daebb0c96", "level": 0, "name": "內蒙古自治區", "code": 150000}, { "_id": "593f9c1e

原创 django queryset 序列化爲 json 數據

class UsersObjectListMixin(View):    """封裝返回列表頁數據"""    model = None    def get(self, request):       

原创 MAC 安裝 M2Crypto 失敗,找不到 openssl文件

直接在終端運行下面這條命令: sudo env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include"  SWIG

原创 Python 上傳圖片到 OSS

# -*- coding: utf-8 -*- import oss2, uuid def oss(img_key, img_path): auth = oss2.Auth('LTA。。。。。。', '3XkJh。。。。。

原创 django 生成動態的PDF文件

WeasyPrint,它是一個Python庫可以生成PDF文件從HTML模板中。安裝WeasyPrintpip install WeasyPrint創建一個PDF模板(template)我們需要一個HTML

原创 用HTML5實現網頁版簡歷

<!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <title>個人簡歷</title>     <style>