跳转到主要内容

PyLucid CMS

项目描述

关于PyLucid

PyLucid是一个使用Django-CMS编写的开源Web内容管理系统,用Python编写。

它更像是djangocms-installer的替代品

目标是简化Django-CMS的设置。

PyLucid直接提供编译好的Twitter Bootstrap v4(MIT许可)和一些简单的模板。

PyLucid在GNU通用公共许可证v3或更高版本(GPLv3+)下授权

试试,分叉并贡献! ;)

Build Status on travis-ci.org

travis-ci.org/jedie/PyLucid

Coverage Status on coveralls.io

coveralls.io/r/jedie/PyLucid

Requirements Status on requires.io

requires.io/github/jedie/PyLucid/requirements/

安装

1. 在PyLucid虚拟环境中bootstrap

# download bootstrap file:
/home/FooBar$ wget https://github.com/jedie/PyLucid/raw/master/pylucid/pylucid_boot.py

# Create virtualenv with all needed packages:
/home/FooBar$ python3 pylucid_boot.py boot ~/PyLucid-env

2. 使用创建的PyLucid虚拟环境

# Go into created virtualenv:
/home/FooBar$ cd ~/PyLucid-env

# activate the env:
~/PyLucid-env $ source bin/activate

# Start the interactive admin shell:
(PyLucid-env) ~/PyLucid-env $ pylucid_admin

pylucid_admin.py shell v3.0.0
Type help or ? to list commands.

pylucid_admin.py>

3. 创建页面实例

页面实例是一个具有自己的设置的自定义django项目,便于快速启动自己的网站。在交互式管理shell中创建页面实例

pylucid_admin.py> create_page_instance ~/page_instance you_project_name
...
pylucid_admin.py> quit

# Go into created page instance
(PyLucid_env) ~/PyLucid_env $ cd ~/page_instance/

# Create cache tables
(PyLucid_env) ~/page_instance $ ./manage.py createcachetable

# init database
(PyLucid_env) ~/page_instance $ ./manage.py migrate

# Create a super user
(PyLucid_env) ~/page_instance $ ./manage.py createsuperuser

# Copies all static files together:
(PyLucid_env) ~/page_instance $ ./manage.py collectstatic

# run developer server:
(PyLucid_env) ~/page_instance $ ./manage.py runserver

更新

一般概述

  • 更新环境

  • 迁移数据库

  • 收集静态文件

  • 更新您自己的模板/样式(不一定需要)

看起来像这样

# Go into created virtualenv:
/home/FooBar$ cd ~/PyLucid-env

# activate the env:
~/PyLucid-env $ source bin/activate

# Start the interactive admin shell and update environment:
(PyLucid-env) ~/PyLucid-env $ pylucid_admin

pylucid_admin.py shell v3.0.0
Type help or ? to list commands.

pylucid_admin.py> update_env
...
pylucid_admin.py> quit

# Go into created page instance
(PyLucid_env) ~/PyLucid_env $ cd ~/page_instance/

# init database
(PyLucid_env) ~/page_instance $ ./manage.py migrate

# Copies all static files together:
(PyLucid_env) ~/page_instance $ ./manage.py collectstatic

注意:请检查下面的“不兼容的更改”!

更多信息

运行测试项目

您可以使用Django开发服务器运行测试项目

(PyLucid-env) ~/PyLucid-env $ pylucid_admin run_test_project_dev_server

手动安装

注意:您可以通过PyPi包手动安装PyLucid

  • 创建虚拟环境

  • 通过pip从PyPi安装pylucid

  • 运行 pylucid_admin update_env

pylucid_boot.py - 交互式Shell

pylucid_boot.py 是一个带有命令补全的交互式Shell。您可以启动它并执行以下操作

/home/FooBar$ python3 pylucid_boot.py

pylucid_boot.py shell v0.2.0
Type help or ? to list commands.

pylucid_boot.py> ?

Hint: All commands can be called directly from commandline.
e.g.: $ ./pylucid_boot.py help

Use <tab> to command completion.

Documented commands (type help <topic>):
========================================
boot  boot_developer  help  quit

pylucid_admin.py - 交互式Shell

pylucid_admin.py 是一个带有命令补全的交互式Shell,例如

(PyLucid_env) ~/PyLucid_env $ pylucid_admin
Activated virtualenv detected: '/home/foobar/PyLucid-env' (/home/foobar/PyLucid-env/bin/python3)

pylucid_admin.py shell v0.2.0
Type help or ? to list commands.

pylucid_admin.py> ?

Hint: All commands can be called directly from commandline.
e.g.: $ ./pylucid_admin.py help

Use <tab> to command completion.

Documented commands (type help <topic>):
========================================
change_editable_address  pip_freeze  run_test_project_dev_server
create_page_instance     pytest      update_env
help                     quit        upgrade_requirements

外部应用程序配置

依赖应用程序可能需要配置才能正常运行。

请参阅每个应用程序的详细文档。

向后不兼容的更改

每次更新:运行“更新”部分中的步骤:见上文。

v3.1到v3.2

更新您的页面实例 urls.py 例如

- url(r'^admin/', include(admin.site.urls)),
+ url(r'^admin/', admin.site.urls),

v3.0到v3.1

Twitter bootstrap从v3更新到v4:更新您自己的模板/样式。

v2.1到v3.0

创建一个新的PyLucid环境和一个新的页面实例。请参阅“安装”部分。转移设置,例如:数据库连接信息。

只需运行“迁移”和“收集静态文件”,并更新您自己的模板/样式。

旧版本的更改在此处: https://www.pylucid.org/de/blog/tag/backward-incompatible/

兼容性矩阵

PyLucid

Django-CMS

Django

Python

v3.2

V3.7

V2.2 LTS

3.6, 3.7, 3.8

v3.0

V3.4 LTS

V1.11 LTS

3.5, 3.6

v2.1

v3.3

v1.8 LTS

3.4, 3.5

v2.0

v3.2

v1.8 LTS

3.4, 3.5

<=v1.6

v1.6

2.6, 2.7

发布历史

(并非所有旧版本都列出来了。)

关于更早的 PyLucid 历史,请查看

捐赠

项目详情


发布历史 发布通知 | RSS 源

下载文件

下载适合您平台的文件。如果您不确定该选择哪个,请了解更多关于安装包的信息。

源代码分发

PyLucid-3.2.0.tar.gz (433.3 kB 查看散列)

上传时间 源代码

构建版本

PyLucid-3.2.0-py3.6.egg (391.4 kB 查看散列)

上传时间 源代码

PyLucid-3.2.0-py2.py3-none-any.whl (396.6 kB 查看散列)

上传时间 Python 2 Python 3

由以下组织支持