Giter VIP home page Giter VIP logo

pylucid's Introduction

not maintained

PyLucid is currently not under active development!

about PyLucid

PyLucid is an Open Source web content management system written in Python using Django-CMS.

It's more a alternative for djangocms-installer

The goal is to simplify the Django-CMS setup.

PyLucid delivers ready-to-use compiled Twitter Bootstrap v4 (Licensed under MIT) with some simple templates directly.

PyLucid is licensed under GNU General Public License v3 or later (GPLv3+)

Try, fork and contribute! ;)

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/

install

1. bootstrap PyLucid virtualenv

# 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. use the created PyLucid virtualenv

# 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. create a page instance

A page instance is a django project with own settings, for easy start a own web page. Create a page instance in the interactive admin 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

update

A general overview:

  • update environment
  • migrate database
  • collect static files
  • Update you own templates/styles (not always needed)

Looks like this:

# 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

Note: Check 'Backward-incompatible changes' below!

further information

run test project

You can run a test project with the django developer server:

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

bootstrap manually

Note: You can install PyLucid manually via PyPi package:

  • create virtualenv
  • install pylucid via pip from PyPi
  • run pylucid_admin update_env

pylucid_boot.py - interactive shell

pylucid_boot.py is a interactive shell with command completion. You can just start it and do this:

/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 - interactive shell

pylucid_admin.py is a interactive shell with command completion, e.g.:

(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

External applications configuration

Dependency applications may need configuration to work properly.

Please, refer to each application documentation on details.

Backward-incompatible changes

On every update: Run the steps from section 'update': see above.

v3.1 to v3.2

update your page instance urls.py e.g.:

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

v3.0 to v3.1

Twitter bootstrap updated from v3 to v4: update you own templates/styles.

v2.1 to v3.0

Create a new, fresh PyLucid environment and a new page instance. See "install" section above. Transfer settings e.g.: Database connection information.

Just run "migrations" and "collectstatic" and update you own templates/styles.

Older changes are here: https://www.pylucid.org/de/blog/tag/backward-incompatible/

Compatible Matrix

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

Release History

(Not all old releases are listed.)

For older PyLucid history, look at:

donation

links

Homepage http://www.pylucid.org
Sourcecode @ GitHub github.com/jedie/PyLucid
Python Package Index pypi.org/project/PyLucid/
IRC #pylucid on freenode.net

pylucid's People

Contributors

dependabot[bot] avatar jedie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pylucid's Issues

bug in color renaming

2 designs with same css and different colorschemes

in colorscheme A exist a unused color, named "white"
in colorscheme B doesn't exist "white"

rename in colorscheme B one color into "white"... crash!

unify all action links

unify "edit" / "delete" admin links in UpdateJournal, lexicon, blog. So it's possible to use the same CSS für every link.

limit users to site

site values in user profile doesn't really limit the user to access other sites.

improve permission system wrt to non-staff users

currently all users that are authenticated get the PyLucid admin menu on top. No matter whether they have any admin rights or not. Current workaround is to conditionally take the menu out of the template. A more sophisticated solution would be preferrable (eg. check whether there are any admin rights and only show the menu if so)

Workaround code:

{% if user.is_staff %}
    <div id="admin">{% lucidTag admin_menu %}</div>   
{% endif %}

selecting "other language" entry on sitemap for plugin pages...

bring up the sitemap on a (at least) bi-lingual site. Let say you're on "en" and you have an entry 'blog (other language "de")'. When selecting the "de" part to bring up the blog in german you switch to the blog page but it is brought up in english. So you stay within the language th sitemap was brought up.
Interestingly the url shows the correct 'de' or 'en' within the path! Still the language of the content is wrong.

Chris

EDIT (jedie): Change title...

AttributeError: Error rendering plugin view "auth.http_get_view": 'SafeUnicode' object has no attribute 'set_cookie'

Somethimes i get these error mails:

  File "PyLucid_env/src/pylucid/pylucid_project/apps/pylucid/views.py", line 383, in resolve_url
    return _render_page(request, pagetree, url_lang_code, prefix_url, rest_url)
  File "PyLucid_env/src/pylucid/pylucid_project/apps/pylucid/views.py", line 133, in _render_page
    get_view_response = PYLUCID_PLUGINS.call_get_views(request)
  File "PyLucid_env/src/pylucid/pylucid_project/system/pylucid_plugins.py", line 252, in call_get_views
    request, mod_name="views", func_name=method_name, method_kwargs={}
  File "PyLucid_env/src/pylucid/pylucid_project/system/pylucid_plugins.py", line 117, in call_plugin_view
    response = callable(request, **method_kwargs)
  File "PyLucid_env/src/django/django/utils/decorators.py", line 110, in _wrapped_view
    return middleware.process_response(request, response)
  File "PyLucid_env/src/django/django/middleware/csrf.py", line 240, in process_response
    response.set_cookie(settings.CSRF_COOKIE_NAME,
AttributeError: Error rendering plugin view "auth.http_get_view": 'SafeUnicode' object has no attribute 'set_cookie'
´´´

register PluginPage urls on startup...

Now we assign PluginPage urls only if a request on such a PluginPage runs.

We should register PluginPage urls on startup. So everywhere we can reverse PluginPage urls and we no longer need to assign it on request in https://github.com/jedie/PyLucid/blob/master/pylucid_project/apps/pylucid/system/pylucid_plugin.py

The Question is: When and where should we fetch all existing PluginPages and assign these urls...
If we do it in the main url.py -> restart the app on PluginPage changes is needed.

500 on remove unused css colors on a other site...

IMHO remove on_site and use objects here:

File "/home/jedie/PyLucid_env/src/pylucid/pylucid_project/apps/pylucid/admin.py", line 213, in cleanup
colorscheme = models.ColorScheme.on_site.get(id=object_id)

urls when adding journal entries manullay do not behave like pylucid entries: they must be "fully qualified" (incl protocol & domain)

pylucid creates update_journal entries automatically but they can also be added manually via the django admin interface. When doing the latter the entry "Object url:" must really contain a full url include protocol (eg. http://www.pylucid.de/en/gallery) whereas internal pylucid entries are without prototocol and domain (eg as above: /en/gallery). When creating entries manually the pylucid type entries should work.

Add a AJAX diff view in inline edit...

Sometimes i open more than one page inline edit pages...
Then i didn't know what i have change (or e.g. just copy&past something out)

I is a good idea to have a simple diff view, similar to the template overwrite diff view!

Plugin page can't be the first page...

Get a 404 if the first page is a plugin page:

Using the URLconf defined in pylucid_project.urls, Django tried these URL patterns, in this order:

  1. ^None/None/

The current URL, , didn't match any of these.

rearranging the page tree breaks menu links

After restructuring parts of my page tree, links in the menu (and elsewhere? Not sure anymore :-( ) were still pointing to the old location.
Example: my "/blog" link was moved to "/family/blog", same for some other pages that were on root level before. Nevertheless entries in the admin lists and (at least) the menu links where still pointing to "/blog", resulting in error messages when selecting them (obviously ;-).
I was the editing the PageMetas an checking everyting in the admin area => no change. The lists in the admin area were the displayed correctly but menu links still were wrong.

Only after deleting the page cache and restarting apache, the links finally were OK. I don't have much more information right now, but wanted to lock it in as an issue.

Chris

ContextMiddleware with template inheritance...

This doesn't work:

base_template.html

<html>
<head>
<!-- ContextMiddleware extrahead -->
</head>
<body>
<!-- ContextMiddleware breadcrumb -->
{% block content %}{{ page_content }}{% endblock content %}
</body>
</html>

template_inheritance.html

{% extends "base_template.html" %}
{% block content %}FooBar{% endblock content %}

I get these errors in the rendered page:

[Error: context middleware 'extrahead' doesn't exist!]
[Error: context middleware 'breadcrumb' doesn't exist!]

work a round:

base_template.html

<html>
<head>
{% block extrahead2 %}<!-- ContextMiddleware extrahead -->{% endblock extrahead2 %}
</head>
<body>
{% block breadcrumb2 %}<!-- ContextMiddleware breadcrumb -->{% endblock breadcrumb2 %}
{% block content %}{{ page_content }}{% endblock content %}
</body>
</html>

template_inheritance.html

{% extends "base_template.html" %}
{% block extrahead2 %}<!-- ContextMiddleware extrahead -->{% endblock extrahead2 %}
{% block breadcrumb2 %}<!-- ContextMiddleware breadcrumb -->{% endblock breadcrumb
{% block content %}FooBar{% endblock content %}

"permalink" not correct for galleries

when descending a gallery into its sub-albums the breadcrumbs get updated correctly but the "permalink" always points to the gallery main page (=PluginPage that was created).

IMHO it should point to the current (sub-)album of the gallery.

Chris

500 on duplicate color name after insert a color value in headfile content

File "/home/jedie/PyLucid_env/src/django/django/contrib/admin/options.py", line 603, in save_model
obj.save()
File "/home/jedie/PyLucid_env/src/pylucid/pylucid_project/apps/pylucid/models/editable_headfile.py", line 422, in save
self.update_colorscheme()
File "/home/jedie/PyLucid_env/src/pylucid/pylucid_project/apps/pylucid/models/editable_headfile.py", line 403, in update_colorscheme
defaults={"value": color_value}
File "/home/jedie/PyLucid_env/src/django/django/db/models/manager.py", line 135, in get_or_create
return self.get_query_set().get_or_create(**kwargs)
File "/home/jedie/PyLucid_env/src/django/django/db/models/query.py", line 381, in get_or_create
raise e
IntegrityError: (1062, "Duplicate entry '9-darkslategrey_d40' for key 2")

Change tag navi template

if no tags than dont show fieldset:
{% extends "pylucid/css_anchor_div.html" %}
{% load tagging_tags %}

{% block plugin_content %}
{% tags_for_object pagemeta as tags %}
{% if tags %}

tag navi {% for tag in tags %} {% if not forloop.first %}|{% endif %} {{ tag.name }} {% endfor %}

{% endif %}
{% endblock plugin_content %}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.