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 details)

Uploaded Source

Built Distributions

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

Uploaded Source

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

Uploaded Python 2 Python 3

File details

Details for the file django-ya-model-publisher-0.5.0.tar.gz.

File metadata

File hashes

Hashes for django-ya-model-publisher-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ce2a22cb630c08528588c88b993e6f785908717d6051044eb71ac767009b350b
MD5 0f9a0b68f8eb119d10e199dba9c2d9d2
BLAKE2b-256 9de6779c200d55ae5b3cef953c24fb0b842daa525c67678b4cdfd5e405760b00

See more details on using hashes here.

File details

Details for the file django_ya_model_publisher-0.5.0-py3.5.egg.

File metadata

File hashes

Hashes for django_ya_model_publisher-0.5.0-py3.5.egg
Algorithm Hash digest
SHA256 9ca9524c8a00d15c389b842cddc12b886c053c775ea37e80b7b542345425af9f
MD5 4775206de874e21ecce6e58261006c32
BLAKE2b-256 feee601552bbd5ba1c8f114af8b385c1b712fafbd3f41bc62d432a1536094b1e

See more details on using hashes here.

File details

Details for the file django_ya_model_publisher-0.5.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_ya_model_publisher-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 07afcff3d1973495dc39f0a285bf7189b3da0ac1825034f29d94653d99f26c93
MD5 e586fd2709fbebb5de31f97f5a27b128
BLAKE2b-256 7b41bef842a8f53af34d3ea34ac0daa76d6d6e670fe441379ee2747f2884db57

See more details on using hashes here.

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