Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/django-cms/djangocms-file

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.
https://github.com/django-cms/djangocms-file

addon cms django django-cms python

Last synced: 22 days ago
JSON representation

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.

Awesome Lists containing this project

README

        

===============
django CMS File
===============

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

.. image:: 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

.. |pypi| image:: https://badge.fury.io/py/djangocms-file.svg
:target: http://badge.fury.io/py/djangocms-file
.. |build| image:: https://travis-ci.org/django-cms/djangocms-file.svg?branch=master
:target: https://travis-ci.org/divio/djangocms-file
.. |coverage| image:: https://codecov.io/gh/django-cms/djangocms-file/branch/master/graph/badge.svg
:target: https://codecov.io/gh/divio/djangocms-file

.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg
:target: https://pypi.org/project/djangocms-file/
.. |django| image:: https://img.shields.io/badge/django-2.2--4.0-blue.svg
:target: https://www.djangoproject.com/
.. |djangocms| image:: https://img.shields.io/badge/django%20CMS-3.7%2B-blue.svg
:target: https://www.django-cms.org/

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-` 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-` plugins.