Skip to main content

Tools/helpers around Django-CMS

Project description

Miscellaneous tools/helpers for django CMS.

Look also at the siblings project: django-tools (Tools/helpers around Django).

Build Status on travis-ci.org

travis-ci.org/jedie/django-cms-tools

Coverage Status on coveralls.io

coveralls.io/r/jedie/django-cms-tools

Status on landscape.io

landscape.io/github/jedie/django-cms-tools/master

existing stuff

test fixture creation

django_cms_tools.fixtures.pages

Helper for creating Django CMS pages in test fixtures:

Class django_cms_tools.fixtures.pages.***CmsPageCreator* can be used for create normal/plugin CMS pages. Inherit from the class and overwrite attributes/methods for your need ;) Example, look into the Test code.

Source: django_cms_tools/fixtures/pages.py Test/Example: /tests/test_fixtures_pages.py

create_cms_index_pages

Create CMS home page in all existing languages (settings.LANGUAGES) and fill placeholder with TextPlugin, use:

  • django_cms_tools.fixtures.pages.***create_cms_index_pages*

create_cms_plugin_page

Create CMS plugin page in all existing languages (settings.LANGUAGES) and add a link to the index page.

  • django_cms_tools.fixtures.pages.***create_cms_plugin_page*

django filer tools experimental

Activate by change your settings.py, e.g.:

INSTALLED_APPS = [
    ...
    'django_cms_tools.filer_tools',
    ...
]

‘image info’ management command

Display information about the number of existing, missing and ignored images. And a summary about all used images. usage:

$ ./manage.py image_info

34 items - foo.Bar
34 instanced checked:
   0 exist    0 missing   34 ignored - foo.BarModel.meta_image
  34 exist    0 missing    0 ignored - foo.BarModel.filer_overview_image

...

total:
    existing images..: 6171
    missing images...: 0
-------------------------------------------------------------------------------
Collect all filer IDs...
File: 2 entries
Image: 2 entries
Information about File:
    Total entry count: 8042 entries.
    Used entry count: 2 entries.
    Total size: 13.8 GB
    Used size: 997.5 KB
Information about Image:
    Total entry count: 6993 entries.
    Used entry count: 2 entries.
    Total size: 13.7 GB
    Used size: 997.5 KB
(Note: 'File' contains 'Image' ;)

‘replace broken’ management command

Replace all not existing files files with a given filer ID.

e.g.: You would like to make a clone of a existing installation, but without to move the real files:

  1. make a DB dump on the source system

  2. insert the DB dump the the cloned system

  3. log into django admin of the new cloned version

  4. upload a “dummy.jpg” filer image

  5. write down the filer image ID (e.g.: 123)

  6. start: $ ./manage.py replace_broken 123

‘template_info’ management command

Activate e.g.:

INSTALLED_APPS = [
    ...
    'django_cms_tools',
    ...
]

It looks like:

$ ./manage.py template_info

There are 3 public pages:
pk:1 /en/                                     /foo/homepage.html
pk:2 /en/foo/                                 INHERIT
pk:3 /en/foo/bar/                             INHERIT

Django compatibility

django-cms-tools

django version

python

dev

1.8

3.5, 3.6

v0.4.0

1.8

2.7, 3.5, 3.6

v0.1.x

1.8

2.7, 3.4, 3.5

(Look also into .travis.yml for version combination tested via travis-ci)

TODO:

  • Add tests for ‘filer commands’

  • Support Django 1.9 and 1.10 and run tests against these versions.

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-cms-tools-0.5.0.tar.gz (41.8 kB view details)

Uploaded Source

Built Distributions

django_cms_tools-0.5.0-py3.5.egg (38.2 kB view details)

Uploaded Source

django_cms_tools-0.5.0-py2.py3-none-any.whl (43.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-cms-tools-0.5.0.tar.gz.

File metadata

File hashes

Hashes for django-cms-tools-0.5.0.tar.gz
Algorithm Hash digest
SHA256 d972bdbbd28b5145a007744ad0e064e6262c851d1cb03a4d2cb5401b641b151f
MD5 500499bea4c22340e50fb0f72f39f7e4
BLAKE2b-256 6baf7ec8210a0949abc39f6a592353f4c7c749e6a43e20844c97bb75b9ab2b04

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for django_cms_tools-0.5.0-py3.5.egg
Algorithm Hash digest
SHA256 bb055e061b7027d354ae757f20df7fee8705b7ff6be956c76bf47afbb5e31faf
MD5 b9b3814894a45a2a3d32e0aea04cabfc
BLAKE2b-256 6adda208fbb1544cd922589c7f2905d32b9452eb0a27e88ec89f64870e610b0c

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for django_cms_tools-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 241ebfbde555df322703897f24e8dc90f32e2b789fa886a2de33cda78c650fcd
MD5 073de661eab07a1ae21356fda48a05fb
BLAKE2b-256 cfe363bc9725856ad25ecaedc20c5570160601d280e7c401c7cc855b7b5b3410

See more details on using hashes here.

Provenance

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