Skip to main content

Adds file plugin to django CMS

Project description

pypi build coverage python django djangocms

django CMS File is a set of plugins for django CMS that allow you to add files to your site You can either choose a single file or an entire folder.

It uses files managed by Django Filer.

This addon is compatible with Divio Cloud for easy installation.

preview.gif

Contributing

This is a an open-source project. We’ll be delighted to receive your feedback in the form of issues and pull requests. Before submitting your pull request, please review our contribution guidelines.

We’re grateful to all contributors who have helped create and maintain this package. Contributors are listed at the contributors section.

One of the easiest contributions you can make is helping to translate this addon on Transifex.

Documentation

See REQUIREMENTS in the setup.py file for additional dependencies:

  • Django Filer 1.7 or higher

Make sure django-filer is installed and configured appropriately.

Installation

For a manual install:

  • run pip install djangocms-file

  • add djangocms_file to your INSTALLED_APPS

  • run python manage.py migrate djangocms_file

Configuration

Note that the provided templates are very minimal by design. You are encouraged to adapt and override them to your project’s requirements.

This addon provides a default template for all instances. You can provide additional template choices by adding a DJANGOCMS_FILE_TEMPLATES setting:

DJANGOCMS_FILE_TEMPLATES = [
    ('feature', _('Featured Version')),
]

You’ll need to create the feature folder inside templates/djangocms_file/ otherwise you will get a template does not exist error. You can do this by copying the default folder inside that directory and renaming it to feature.

Running Tests

You can run tests by executing:

virtualenv env
source env/bin/activate
pip install -r test_requirements/base.txt
python setup.py test

Updating from cmsplugin-filer

Historically, cmsplugin-filer was used to create file, folder, image, link, teaser & video plugins on your django CMS projects. Now cmsplugin-filer has been archived, you can still migrate your old instances without having to copy them manually to the new djangocms-<file|picture|link|…> plugins.

There’s a third-party management command that supports your migration:

migrate_cmsplugin_filer.py

This management command is only a starting point. It has worked out of the box for some people, but we encourage you to read the code, understand what it does, and test it on a development environment before running it on your production server.

The management command is only configured to transfer your cmsplugin_link, cmsplugin_file, cmsplugin_folder and cmsplugin_image plugins to modern djangocms_* plugins. If you need to transfer other cmsplugin_* plugins, you’ll have to write your own code.

Alternatively you can use the deprecate_cmsplugin_filer app, which only adds a small migration that transfer the old cmsplugin-filer plugins instances to the new djangocms-<file|picture|link|…> plugins.

Download files

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

Source Distribution

djangocms-file-3.0.1.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

djangocms_file-3.0.1-py3-none-any.whl (141.8 kB view details)

Uploaded Python 3

File details

Details for the file djangocms-file-3.0.1.tar.gz.

File metadata

  • Download URL: djangocms-file-3.0.1.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for djangocms-file-3.0.1.tar.gz
Algorithm Hash digest
SHA256 b4952eb57385fadb31f67ed61e34eec3fe5886669163f959d1b56a9ac0fb5b42
MD5 2e4aaee7ec6656419a5147b445837982
BLAKE2b-256 801a1909347ae423e5481bfc4f6a3c0d4cb0c3b0ae9be069c60124cac4f4497b

See more details on using hashes here.

File details

Details for the file djangocms_file-3.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for djangocms_file-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 83a41fa18d5a0d032e79093de51503862dd6812bd63dfe6de06c5dd078108336
MD5 fb6b537a8333ab8e0aca5d04184c3ce2
BLAKE2b-256 2eadc2a10b596ade3e871b9eac1a39f2ae17b6e4872e605ecd5e0ef819b6fdba

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