Package: django-ya-model-publisher
Publisher workflow for django models and Django CMS pages.This is a fork ofandersinno/django-model-publisher-aiwhich is a fork of the originjp74/django-model-publisher.travis-ci.org/wearehoods/django-ya-model-publishercodecov.io/gh/wearehoods/django-ya-model-publishercoveralls.io/r/wearehoods/django-ya-model-publisherFeaturesDjango CMS page support.Add request/reject buttons in Django CMS toolbar.Django CMS placeholders support.Hvad/Parler support.Restrict user access to publish functions with user permissions.base infoWe have these three user types:A user with only a few rights (we call it‘reporter’)A user with more rights (We call it‘editor’)The superuser with all rightsThe user case is following:‘reporter’:can only change draft contentcan’t change public contentcan’t delete publisher model entries or CMS pages.can send a(un-)publish requestto the ‘editor’ with a text node.‘editor’:can response open publishing request from ‘reporter’.can change drafts and public content, but only if there is no pending request.can delete publisher model entries or CMS pages.can’t delete/manipulate publisher state model entries.permissionsPermissions for‘reporter’who can only create(un-)publish requests:...
[ ] cms.publish_page
...
[*] cms.add_page
[*] cms.change_page
[ ] cms.delete_page
...
[ ] publisher.add_publisherstatemodel
[*] publisher.change_publisherstatemodel
[ ] publisher.delete_publisherstatemodel
...
[ ] <app_name>.can_publish_<model_name>
...
[*] <app_name>.add_<model_name>
[*] <app_name>.change_<model_name>
[ ] <app_name>.delete_<model_name>
...Permissions for‘editor’who canaccept/reject (un-)publish requests:...
[*] cms.publish_page
...
[*] cms.add_page
[*] cms.change_page
[*] cms.delete_page
...
[ ] publisher.add_publisherstatemodel
[*] publisher.change_publisherstatemodel
[ ] publisher.delete_publisherstatemodel
...
[*] <app_name>.can_publish_<model_name>
...
[*] <app_name>.add_<model_name>
[*] <app_name>.change_<model_name>
[*] <app_name>.delete_<model_name>
...Important: To prevent a privilege escalation, both users mustnothave access to these models:django.contrib.auth.models.Permissiondjango.contrib.auth.models.Groupcms.models.PagePermissionTest users:See user permission tests in:publisher_tests.test_basics.PermissionTestCasePrimary key type compatibilityThepublisher.models.PublisherStateModelused aPositiveIntegerFieldfor theGenericForeignKeyso it can only be used for models with a integer primary keys!
See also:https://docs.djangoproject.com/en/1.11/ref/contrib/contenttypes/#django.contrib.contenttypes.fields.GenericForeignKeyDjango compatibilitydjango-ya-model-publisherdjango cmsdjango versionpython>=v0.6.x3.4.x1.113.5, 3.6>=v0.5.x3.4.x1.8, 1.9, 1.10, 1.113.5, 3.6v0.4.x3.4.x1.8, 1.9, 1.10, 1.112.7, 3.4, 3.5, 3.6Note: See travis/tox config files for current test matrixCurrently Django CMS v3.5 is not supported, yet.
It’s on the TODO, see:issues #10run testsrun tests viapy.testwith current python/environment:$ make test
or
$ ./setup.py test
or
$ python tests/manage.py test myapprun test viatoxe.g.:$ make tox
or
$ ./setup.py tox
or
$ toxrun test projectYou can run the test environment by:$ ./run_test_project_dev_server.shor:$ ./publisher_test_project/manage.py run_test_project_dev_serverThe following steps will be executed:Create django users if not exists:A django‘superuser’The usereditor: He can accept/reject un-/publish requestsThe userreporter: He can create un-/publish requestsnote: Both users will used the same password as the ‘superuser’ !run migrationinsert test fixtures (Create Django CMS pages)collect static filesrun the django development server on localhostYou can pass arguments to the helper script, e.g.:$ ./run_test_project_dev_server.sh --help
...
usage: manage.py run_test_project_dev_server [-h] [--version] [-v {0,1,2,3}]
                                             [--settings SETTINGS]
                                             [--pythonpath PYTHONPATH]
                                             [--traceback] [--no-color]
                                             [--ipv6] [--nothreading]
                                             [--noreload] [--nostatic]
                                             [--insecure]
                                             [addrport]
...To ‘reset’ the test fixtures, run this:$ ./publisher_test_project/manage.py create_test_data --freshFor a complete fresh database, just remove the sqlite file, e.g.:$ rm publisher_test_project/publisher_test_database.sqlite3Backwards-incompatible changesv0.7.0PublisherCmsViewMixin, PublisherCmsDetailView, PublisherCmsListViewmoved from:publisher.viewsto:publisher_cms.viewsv0.6.0The permission names changed! Please update your django user permissions, too.These permissions are removed:direct_publisherask_publisher_requestreply_publisher_requestPlease read the information above.historydevcompare v0.7.0…masterv0.7.0 - 22.02.2018 -compare v0.6.9…v0.7.0Backwards-incompatible changes (see above)Remove support for Django 1.8NEW: Add publish links to Django CMS toolbar inPublisherCmsDetailViewChangePublisherPageToolbarlink text and add “page” to them (to differentiate them better fromPublisherCmsDetailViewlinks)v0.6.9 - 01.02.2018 -compare v0.6.8…v0.6.9BugfixAttributeError: 'PublisherPageToolbar' object has no attribute 'current_request'if superuser edit a cms pagev0.6.8 - 01.02.2018 -compare v0.6.7…v0.6.8Fix#9 Redirect after “request publishing”Add reply/history Links in Django CMS Toolbar (specially for page with pending requests)v0.6.7 - 31.01.2018 -compare v0.6.6…v0.6.7NEW: ‘History’ view in admin (e.g.: see status/history of closed request and status for users that can only create requests)No 404 when “reply” closed requests or deleted instance.v0.6.6 - 30.01.2018 -compare v0.6.5…v0.6.6Bugfix: redirect after “Request publishing” can result in a 404, see:issues #9v0.6.5 - 30.01.2018 -compare v0.6.4…v0.6.5Bugfix: Missing “Request publishing” toobar link on new created pagesAdd username list on test pagesv0.6.4 - 29.01.2018 -compare v0.6.3…v0.6.4Hide PublisherStateModel admin actions for all non-superusersv0.6.3 - 26.01.2018 -compare v0.6.2…v0.6.3Security Fix: User without ‘can_publish’ permission can accept/reject requests.Hide ‘change’ PublisherStateModel admin view for all non-superusersDisable ‘add’ PublisherStateModel admin view for all usersv0.6.2 - 02.01.2018 -compare v0.6.1…v0.6.2Handle publishes states with deletes instance: Add a admin view to close the request.Bugfix: deny editing pending request objectsCreate messages after (un-)/publish request created.v0.6.1 - 28.12.2017 -compare v0.6.0…v0.6.1remove own “unique_together”: Add"publisher_is_draft"to your own “unique_together” tupleremove out dated manage command “update_permissions” (can be found indjango-tools)v0.6.0 - 27.12.2017 -compare v0.5.1…v0.6.0refactor permissions and publisher workflowNEW:publisher.views.PublisherCmsViewMixinNEW:publisher.admin.VisibilityMixinbugfix django v1.11 compatibilityExpand tests withpublisher_test_project.publisher_list_appv0.5.1 - 20.12.2017 -compare v0.5.0…v0.5.1fix python package (add missing parts)change travis/tox/pytest configurationminor code updatev0.5.0 - 19.12.2017 -compare v0.4.1…v0.5.0Skip official support for python v2.7 and v3.4 (remove from text matrix)Implement “request/reject/accept publishing” workflow with a shot messages and loggingAdd “request/reject/accept publishing” buttons to Django CMS toolbar for cms pages.v0.4.1 - 14.11.2017 -compare v0.4.0.dev1…v0.4.1Refactor test run setupbugfix project namev0.4.0.dev1 - 14.11.2017 -compare v0.3.1…v0.4.0.dev1Just create the fork and apply all pull requests fromandersinno/django-model-publisher-ai/pull/14linksHomepagehttp://github.com/wearehoods/django-ya-model-publisherPyPi.orghttps://pypi.org/project/django-ya-model-publisher/PyPi (legacy)http://pypi.python.org/pypi/django-ya-model-publisher/donationpaypal.me/JensDiemerFlattr This!SendBitcoinsto1823RZ5Md1Q2X5aSXRC5LRPcYdveCiVX6F