wagtail-安装配置

系列文章目录


文章目录


安装虚拟环境

https://blog.csdn.net/gsl371/article/details/117917857

安装wagtail

bash 复制代码
(wagenv) C:\djproject\wagprj>pip list
Package    Version
---------- -------
pip        21.0.1
setuptools 54.2.0
wheel      0.36.2


(wagenv) C:\djproject\wagprj>pip install wagtail
Collecting wagtail
  Downloading wagtail-2.12.3-py3-none-any.whl (11.2 MB)
     |████████████████████████████████| 11.2 MB 84 kB/s
Collecting l18n>=2018.5
  Downloading l18n-2020.6.1.tar.gz (50 kB)
     |████████████████████████████████| 50 kB 93 kB/s
Collecting django-modelcluster<6.0,>=5.1
  Downloading django_modelcluster-5.1-py2.py3-none-any.whl (26 kB)
Collecting Willow<1.5,>=1.4
  Downloading Willow-1.4-py2.py3-none-any.whl (106 kB)
     |████████████████████████████████| 106 kB 111 kB/s
Collecting djangorestframework<4.0,>=3.11.1
  Using cached djangorestframework-3.12.4-py3-none-any.whl (957 kB)
Collecting django-taggit<2.0,>=1.0
  Downloading django_taggit-1.3.0-py3-none-any.whl (45 kB)
     |████████████████████████████████| 45 kB 126 kB/s
Collecting xlsxwriter<2.0,>=1.2.8
  Downloading XlsxWriter-1.3.9-py2.py3-none-any.whl (145 kB)
     |████████████████████████████████| 145 kB 92 kB/s
Collecting anyascii>=0.1.5
  Downloading anyascii-0.2.0-py3-none-any.whl (283 kB)
     |████████████████████████████████| 283 kB 152 kB/s
Collecting beautifulsoup4<4.9,>=4.8
  Downloading beautifulsoup4-4.8.2-py3-none-any.whl (106 kB)
     |████████████████████████████████| 106 kB 139 kB/s
Collecting draftjs-exporter<3.0,>=2.1.5
  Downloading draftjs_exporter-2.1.7-py3-none-any.whl (43 kB)
     |████████████████████████████████| 43 kB 131 kB/s
Collecting html5lib<2,>=0.999
  Using cached html5lib-1.1-py2.py3-none-any.whl (112 kB)
Collecting requests<3.0,>=2.11.1
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting Django<3.2,>=2.2
  Using cached Django-3.1.8-py3-none-any.whl (7.8 MB)
Collecting tablib[xls,xlsx]>=0.14.0
  Downloading tablib-3.0.0-py3-none-any.whl (47 kB)
     |████████████████████████████████| 47 kB 156 kB/s
Collecting Pillow<9.0.0,>=4.0.0
  Using cached Pillow-8.2.0-cp38-cp38-win_amd64.whl (2.2 MB)
Collecting django-filter<3.0,>=2.2
  Downloading django_filter-2.4.0-py3-none-any.whl (73 kB)
     |████████████████████████████████| 73 kB 130 kB/s
Collecting django-treebeard!=4.5,<5.0,>=4.2.0
  Using cached django_treebeard-4.5.1-py3-none-any.whl (103 kB)
Collecting soupsieve>=1.2
  Downloading soupsieve-2.2.1-py3-none-any.whl (33 kB)
Collecting pytz
  Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting asgiref<4,>=3.2.10
  Using cached asgiref-3.3.4-py3-none-any.whl (22 kB)
Collecting sqlparse>=0.2.2
  Using cached sqlparse-0.4.1-py3-none-any.whl (42 kB)
Collecting six>=1.9
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting webencodings
  Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.4-py2.py3-none-any.whl (153 kB)
Collecting idna<3,>=2.5
  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 155 kB/s
Collecting certifi>=2017.4.17
  Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
     |████████████████████████████████| 147 kB 148 kB/s
Collecting chardet<5,>=3.0.2
  Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
     |████████████████████████████████| 178 kB 198 kB/s
Collecting openpyxl>=2.6.0
  Downloading openpyxl-3.0.7-py2.py3-none-any.whl (243 kB)
     |████████████████████████████████| 243 kB 242 kB/s
Collecting xlrd
  Downloading xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
     |████████████████████████████████| 96 kB 293 kB/s
Collecting xlwt
  Downloading xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
     |████████████████████████████████| 99 kB 293 kB/s
Collecting et-xmlfile
  Downloading et_xmlfile-1.0.1.tar.gz (8.4 kB)
Building wheels for collected packages: l18n, et-xmlfile
  Building wheel for l18n (setup.py) ... done
  Created wheel for l18n: filename=l18n-2020.6.1-py3-none-any.whl size=51577 sha256=4672c5c34b8cdb840a4b10982cc7e669169e4741e0624878a24e92e89380f421
  Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\ea\5f\6f\2e7864d49b0f7badda5c1402b11254b62a3eadb949e3fc2ab9
  Building wheel for et-xmlfile (setup.py) ... done
  Created wheel for et-xmlfile: filename=et_xmlfile-1.0.1-py3-none-any.whl size=8913 sha256=65ee864758d0c127daa8ea81099d063653500e1d576fe59126c6aff5f260a29b
  Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\6e\df\38\abda47b884e3e25f9f9b6430e5ce44c47670758a50c0c51759
Successfully built l18n et-xmlfile
Installing collected packages: sqlparse, pytz, et-xmlfile, asgiref, xlwt, xlrd, webencodings, urllib3, tablib, soupsieve, six, openpyxl, idna, Django, chardet, certifi, xlsxwriter, Willow, requests, Pillow, l18n, html5lib, draftjs-exporter, djangorestframework, django-treebeard, django-taggit, django-modelcluster, django-filter, beautifulsoup4, anyascii, wagtail
Successfully installed Django-3.1.8 Pillow-8.2.0 Willow-1.4 anyascii-0.2.0 asgiref-3.3.4 beautifulsoup4-4.8.2 certifi-2020.12.5 chardet-4.0.0 django-filter-2.4.0 django-modelcluster-5.1 django-taggit-1.3.0 django-treebeard-4.5.1 djangorestframework-3.12.4 draftjs-exporter-2.1.7 et-xmlfile-1.0.1 html5lib-1.1 idna-2.10 l18n-2020.6.1 openpyxl-3.0.7 pytz-2021.1 requests-2.25.1 six-1.15.0 soupsieve-2.2.1 sqlparse-0.4.1 tablib-3.0.0 urllib3-1.26.4 wagtail-2.12.3 webencodings-0.5.1 xlrd-2.0.1 xlsxwriter-1.3.9 xlwt-1.3.0

查看安装后的包

bash 复制代码
(wagenv) C:\djproject\wagprj>pip list
Package             Version
------------------- ---------
anyascii            0.2.0
asgiref             3.3.4
beautifulsoup4      4.8.2
certifi             2020.12.5
chardet             4.0.0
Django              3.1.8
django-filter       2.4.0
django-modelcluster 5.1
django-taggit       1.3.0
django-treebeard    4.5.1
djangorestframework 3.12.4
draftjs-exporter    2.1.7
et-xmlfile          1.0.1
html5lib            1.1
idna                2.10
l18n                2020.6.1
openpyxl            3.0.7
Pillow              8.2.0
pip                 21.0.1
pytz                2021.1
requests            2.25.1
setuptools          54.2.0
six                 1.15.0
soupsieve           2.2.1
sqlparse            0.4.1
tablib              3.0.0
urllib3             1.26.4
wagtail             2.12.3
webencodings        0.5.1
wheel               0.36.2
Willow              1.4
xlrd                2.0.1
XlsxWriter          1.3.9
xlwt                1.3.0

创建wagtail项目

bash 复制代码
wagtail start mysite

安装依赖

bash 复制代码
pip install -r requirements.txt

迁移

powershell 复制代码
(wagenv) C:\djproject\wagprj\mysite>python manage.py migrate
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, home, sessions, taggit, wagtailadmin, wagtailcore, wagtaildocs, wagtailembeds, wagtailforms, wagtailimages, wagtailredirects, wagtailsearch, wagtailusers
Running migrations:
  Applying contenttypes.0001_initial... OK
  
  Applying wagtailusers.0009_userprofile_verbose_name_plural... OK

创建超级用户

powershell 复制代码
(wagenv) C:\djproject\wagprj\mysite>python manage.py createsuperuser
Username (leave blank to use 'administrator'): admin
Email address: admin@sina.com
Password:123
Password (again):
Superuser created successfully.

运行项目

powershell 复制代码
python manage.py runserver
相关推荐
合作小小程序员小小店19 分钟前
旧版本附近停车场推荐系统demo,基于python+flask+协同推荐(基于用户信息推荐),开发语言python,数据库mysql,
人工智能·python·flask·sklearn·推荐算法
动能小子ohhh28 分钟前
Langchain从零开始到应用落地案例[AI智能助手]【3】---使用Paddle-OCR识别优化可识别图片进行解析回答
人工智能·python·pycharm·langchain·ocr·paddle·1024程序员节
NocoBase33 分钟前
8 人团队如何效率拉满?——创联云的开发方法论
数据库·低代码·开源
互联网中的一颗神经元43 分钟前
小白python入门 - 9. Python 列表2 ——从基础操作到高级应用
java·开发语言·python
kgduu1 小时前
go-ethereum core之交易索引txIndexer
服务器·数据库·golang
摇滚侠1 小时前
全面掌握 PostgreSQL 关系型数据库,PostgreSQL 介绍,笔记02
数据库·笔记·postgresql
百锦再1 小时前
国产数据库替代MongoDB的技术实践:金仓数据库赋能浙江省人民医院信息化建设新展望
java·开发语言·数据库·mongodb·架构·eclipse·maven
程序边界1 小时前
MongoDB迁移到KES实战全纪录(下):性能优化与实践总结
数据库·mongodb·性能优化
武子康1 小时前
Java-160 MongoDB副本集部署实战 单机三实例/多机同法 10 分钟起集群 + 选举/读写/回滚全流程
java·数据库·sql·mongodb·性能优化·系统架构·nosql
这儿有一堆花1 小时前
使用 Actix-web 开发高性能 Web 服务
前端·数据库