Skip to main content

Handy mixin/abstract class for providing a "publisher workflow" to arbitrary Django models.

Project description

Publisher workflow for django models and Django CMS pages.

This is a fork of andersinno/django-model-publisher-ai which is a fork of the origin jp74/django-model-publisher.

Build Status on travis-ci.org

travis-ci.org/wearehoods/django-ya-model-publisher

Coverage Status on codecov.io

codecov.io/gh/wearehoods/django-ya-model-publisher

Features

  • Django 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.

Django compatibility

django-ya-model-publisher

django version

python

v0.5.x

1.8, 1.9, 1.10, 1.11

3.5, 3.6

v0.4.x

1.8, 1.9, 1.10, 1.11

2.7, 3.4, 3.5, 3.6

Note: See travis/tox config files for current test matrix

run tests

run tests via py.test with current python/environment:

$ make test
or
$ ./setup.py test
or
$ python tests/manage.py test myapp

run test via tox e.g.:

$ make tox
or
$ ./setup.py tox
or
$ tox

run test project

You can run the test environment by:

$ ./run_test_project_dev_server.sh

or:

$ ./publisher_test_project/manage.py run_test_project_dev_server

The following steps will be executed:

  • Create django users if not exists:

    • A django ‘superuser’

    • The user editor: He can accept/reject un-/publish requests

    • The user reporter: He can create un-/publish requests

    • note: Both users will used the same password as the ‘superuser’ !

  • run migration

  • insert test fixtures (Create Django CMS pages)

  • collect static files

  • run the django development server on localhost

You 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 --fresh

For a complete fresh database, just remove the sqlite file, e.g.:

$ rm publisher_test_project/publisher_test_database.sqlite3

history

donation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-ya-model-publisher-0.5.0.tar.gz (42.7 kB view hashes)

Uploaded Source

Built Distributions

django_ya_model_publisher-0.5.0-py3.5.egg (33.5 kB view hashes)

Uploaded Source

django_ya_model_publisher-0.5.0-py2.py3-none-any.whl (37.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page