内容管理系统及个人云系统调研


关于wagtail 内容管理系统

一、安装:

1. 鉴于wagtail需要安装的库太多,所以用了vitrualenv

python hljs    11行

~#pip install virtualenv virtualenvwrapper
~#我用的是zsh,故将下列环境变量写入~/.zshrc
~#vim ~/.zshrc

export WORKON_HOME="/mnt/e/OneDrive/myprograms/pythonProgram/.virtualenv"
export PROJECT_HOME="/mnt/e/OneDrive/myprograms/pythonProgram/"
source /usr/local/bin/virtualenvwrapper.sh 

~#调用环境变量
~#source ~/.zshrc

2. 安装wagtail

python hljs    120行

~#pip install wagtail
~#wagtail start studyZen216 (建立内容服务器站点名称,当前目录下会产生一个studyZen216文件夹)
~#cd studyZen216
~#python manage.py migrate(对站点进行设置)
gtail) root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216 # ls
Dockerfile  home  manage.py  requirements.txt  search  studyZen216
(wagtail) root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216 # 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 auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying wagtailcore.0001_squashed_0016_change_page_url_path_to_text_field... OK
  Applying wagtailcore.0017_change_edit_page_permission_description... OK
  Applying wagtailcore.0018_pagerevision_submitted_for_moderation_index... OK
  Applying wagtailcore.0019_verbose_names_cleanup... OK
  Applying wagtailcore.0020_add_index_on_page_first_published_at... OK
  Applying wagtailcore.0021_capitalizeverbose... OK
  Applying wagtailcore.0022_add_site_name... OK
  Applying wagtailcore.0023_alter_page_revision_on_delete_behaviour... OK
  Applying wagtailcore.0024_collection... OK
  Applying wagtailcore.0025_collection_initial_data... OK
  Applying wagtailcore.0026_group_collection_permission... OK
  Applying wagtailcore.0027_fix_collection_path_collation... OK
  Applying wagtailcore.0024_alter_page_content_type_on_delete_behaviour... OK
  Applying wagtailcore.0028_merge... OK
  Applying wagtailcore.0029_unicode_slugfield_dj19... OK
  Applying wagtailcore.0030_index_on_pagerevision_created_at... OK
  Applying wagtailcore.0031_add_page_view_restriction_types... OK
  Applying wagtailcore.0032_add_bulk_delete_page_permission... OK
  Applying wagtailcore.0033_remove_golive_expiry_help_text... OK
  Applying wagtailcore.0034_page_live_revision... OK
  Applying wagtailcore.0035_page_last_published_at... OK
  Applying wagtailcore.0036_populate_page_last_published_at... OK
  Applying wagtailcore.0037_set_page_owner_editable... OK
  Applying wagtailcore.0038_make_first_published_at_editable... OK
  Applying wagtailcore.0039_collectionviewrestriction... OK
  Applying wagtailcore.0040_page_draft_title... OK
  Applying home.0001_initial... OK
  Applying home.0002_create_homepage... OK
  Applying sessions.0001_initial... OK
  Applying taggit.0001_initial... OK
  Applying taggit.0002_auto_20150616_2121... OK
  Applying wagtailadmin.0001_create_admin_access_permissions... OK
  Applying wagtaildocs.0001_initial... OK
  Applying wagtaildocs.0002_initial_data... OK
  Applying wagtaildocs.0003_add_verbose_names... OK
  Applying wagtaildocs.0004_capitalizeverbose... OK
  Applying wagtaildocs.0005_document_collection... OK
  Applying wagtaildocs.0006_copy_document_permissions_to_collections... OK
  Applying wagtaildocs.0005_alter_uploaded_by_user_on_delete_action... OK
  Applying wagtaildocs.0007_merge... OK
  Applying wagtaildocs.0008_document_file_size... OK
  Applying wagtailembeds.0001_initial... OK
  Applying wagtailembeds.0002_add_verbose_names... OK
  Applying wagtailembeds.0003_capitalizeverbose... OK
  Applying wagtailforms.0001_initial... OK
  Applying wagtailforms.0002_add_verbose_names... OK
  Applying wagtailforms.0003_capitalizeverbose... OK
  Applying wagtailimages.0001_initial... OK
  Applying wagtailimages.0002_initial_data... OK
  Applying wagtailimages.0003_fix_focal_point_fields... OK
  Applying wagtailimages.0004_make_focal_point_key_not_nullable... OK
  Applying wagtailimages.0005_make_filter_spec_unique... OK
  Applying wagtailimages.0006_add_verbose_names... OK
  Applying wagtailimages.0007_image_file_size... OK
  Applying wagtailimages.0008_image_created_at_index... OK
  Applying wagtailimages.0009_capitalizeverbose... OK
  Applying wagtailimages.0010_change_on_delete_behaviour... OK
  Applying wagtailimages.0011_image_collection... OK
  Applying wagtailimages.0012_copy_image_permissions_to_collections... OK
  Applying wagtailimages.0013_make_rendition_upload_callable... OK
  Applying wagtailimages.0014_add_filter_spec_field... OK
  Applying wagtailimages.0015_fill_filter_spec_field... OK
  Applying wagtailimages.0016_deprecate_rendition_filter_relation... OK
  Applying wagtailimages.0017_reduce_focal_point_key_max_length... OK
  Applying wagtailimages.0018_remove_rendition_filter... OK
  Applying wagtailimages.0019_delete_filter... OK
  Applying wagtailimages.0020_add-verbose-name... OK
  Applying wagtailimages.0021_image_file_hash... OK
  Applying wagtailredirects.0001_initial... OK
  Applying wagtailredirects.0002_add_verbose_names... OK
  Applying wagtailredirects.0003_make_site_field_editable... OK
  Applying wagtailredirects.0004_set_unique_on_path_and_site... OK
  Applying wagtailredirects.0005_capitalizeverbose... OK
  Applying wagtailredirects.0006_redirect_increase_max_length... OK
  Applying wagtailsearch.0001_initial... OK
  Applying wagtailsearch.0002_add_verbose_names... OK
  Applying wagtailsearch.0003_remove_editors_pick... OK
  Applying wagtailusers.0001_initial... OK
  Applying wagtailusers.0002_add_verbose_name_on_userprofile... OK
  Applying wagtailusers.0003_add_verbose_names... OK
  Applying wagtailusers.0004_capitalizeverbose... OK
  Applying wagtailusers.0005_make_related_name_wagtail_specific... OK
  Applying wagtailusers.0006_userprofile_prefered_language... OK
  Applying wagtailusers.0007_userprofile_current_time_zone... OK
  Applying wagtailusers.0008_userprofile_avatar... OK
  
 #多了个db.slqite3文件夹
(wagtail) root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216 # ls 
db.sqlite3  Dockerfile  home  manage.py  requirements.txt  search  studyZen216
(wagtail) root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216 #


~#python manage.py createsuperuser(会跳出输入管理员名称和密码的提示)
~#python manage.py runserver(启动server)
~#http://127.0.0.1:8000/admin/. (在浏览器中打开站点)

3. wagtail 进阶(待续)

root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216 # cd home
root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216/home # ls
init.py migrations models.py pycache templates


改变主页
root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216/home # vim models.py

python hljs    14行

from django.db import models

from wagtail.core.models import Page
from wagtail.core.fields import RichTextField
from wagtail.admin.edit_handlers import FieldPanel


class HomePage(Page):
    body = RichTextField(blank=True)

    content_panels = Page.content_panels + [
        FieldPanel('body', classname="full"),
    ]

root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216/#python manage.py makemigrations
root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216/#python manage.py migrate
访问网址:
微信图片_20181030100935


修改模板
root@WJL-SH4031667:/mnt/c/Users/op051193/studyZen216/home # vim templates/home/home_page.html

python hljs    10行

{% extends "base.html" %}

{% load wagtailcore_tags %}

{% block body_class %}template-homepage{% endblock %}

{% block content %}
    {{ page.body|richtext }}
{% endblock %}

4. windows下的安装

5. 一些想法

关于pydio个人云系统:

一、介绍:

二、示例:

二、安装

转载于:https://my.oschina.net/u/129706/blog/2395922

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值