Welcome to djangocms_slick_slider’s documentation!

Contents:

Django CMS Slick Slider Plugin

https://badge.fury.io/py/djangocms-slick-slider.svg https://travis-ci.org/oesah/djangocms-slick-slider.svg?branch=master https://codecov.io/gh/oesah/djangocms_slick_slider/branch/master/graph/badge.svg

A Django CMS Slider Plugin with Slick Slider.

Features

  • Add a Slick Slider to any page via Django CMS Plugin
  • Change/set Slick options via JSONField
  • Set some styling options such as color

CMS

alternate text

Admin Form

alternate text

Output

alternate text

Documentation

The full documentation is at https://djangocms-slick-slider.readthedocs.io.

Quickstart

Install djangocms_slick_slider:

pip install djangocms-slick-slider

Add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'djangocms_slick_slider.apps.DjangocmsSlickSliderConfig',
    ...
)

Example project

You can quickly get an example project up to test / develop the plugin.

If you have virtualenvwrapper installed:

git clone https://github.com/oesah/djangocms_slick_slider.git
cd example
mkvirtualenv my_project_env
pip install -r requirements.txt
python manage.py runserver

Visit your homepage (usually http://localhost:8000).

User: admin Password: adminadmin

You should see some instances of the Slick Slider plugin. You can play around to see, how it works.

Settings

SLICK_SLIDER_VERSION

Version of Slick Slider that should be used. Keep in mind, that this version needs to be in static/vendor/ folder with the appropriate folder name.

If you want to upgrade, download and copy the new version into the before mentioned folder and change the version in the settings.

Default: 1.8.0

SLICK_SLICKER_DEFAULT_OPTIONS

You can adjust the default options by setting SLICK_SLICKER_DEFAULT_OPTIONS to a dictionary.

Default:

SLICK_SLICKER_DEFAULT_OPTIONS = {
    'dots': True,
    'slidesToShow': 2,
    'mobileFirst': False,
    'slidesToScroll': 1,
    'autoplay': True,
    'autoplaySpeed': 1500
}

You can set any option that slick-slider offers. You can find them here: https://kenwheeler.github.io/slick/

SLICK_SLIDER_ACE_THEME

You can change the ACE theme of the edit field in the admin.

Default: json

SLICK_SLIDER_ACE_MODE

You can change the ACE mode of the edit field in the admin.

Default: github

Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

If you have issues with different python versions, please take a look at these docs: https://www.holger-peters.de/using-pyenv-and-tox.html

Release to PyPi

For versioning, you need to have standard-version installed:

yarn install

Once you are ready and everything has been commited to git, you can run:

yarn run release

This will:

  • Bump the version in the according files
  • Commit everything to git and create a git tag
  • Create a package for PyPi and upload it
  • Push everything to Git including tags

Credits

Tools used in rendering this package:

ToDos

  • translations

Sponsorship

This project is maintained by Mathison AG | Mobile & Web Development.

Installation

At the command line:

$ easy_install djangocms-slick-slider

Or, if you have virtualenvwrapper installed:

$ mkvirtualenv djangocms-slick-slider
$ pip install djangocms-slick-slider

Usage

To use djangocms_slick_slider in a project, add it to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...
    'djangocms_slick_slider.apps.DjangocmsSlickSliderConfig',
    ...
)

Add djangocms_slick_slider’s URL patterns:

from djangocms_slick_slider import urls as djangocms_slick_slider_urls


urlpatterns = [
    ...
    url(r'^', include(djangocms_slick_slider_urls)),
    ...
]

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions

Report Bugs

Report bugs at https://github.com/oesah/djangocms-slick-slider/issues.

If you are reporting a bug, please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with “bug” is open to whoever wants to implement it.

Implement Features

Look through the GitHub issues for features. Anything tagged with “feature” is open to whoever wants to implement it.

Write Documentation

djangocms_slick_slider could always use more documentation, whether as part of the official djangocms_slick_slider docs, in docstrings, or even on the web in blog posts, articles, and such.

Submit Feedback

The best way to send feedback is to file an issue at https://github.com/oesah/djangocms-slick-slider/issues.

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Get Started!

Ready to contribute? Here’s how to set up djangocms-slick-slider for local development.

  1. Fork the djangocms-slick-slider repo on GitHub.

  2. Clone your fork locally:

    $ git clone git@github.com:your_name_here/djangocms-slick-slider.git
    
  3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:

    $ mkvirtualenv djangocms-slick-slider
    $ cd djangocms-slick-slider/
    $ python setup.py develop
    
  4. Create a branch for local development:

    $ git checkout -b name-of-your-bugfix-or-feature
    

    Now you can make your changes locally.

  5. When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:

    $ flake8 djangocms_slick_slider tests
    $ python setup.py test
    $ tox
    

    To get flake8 and tox, just pip install them into your virtualenv.

  6. Commit your changes and push your branch to GitHub:

    $ git add .
    $ git commit -m "Your detailed description of your changes."
    $ git push origin name-of-your-bugfix-or-feature
    
  7. Submit a pull request through the GitHub website.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests.
  2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
  3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check https://travis-ci.org/oesah/djangocms-slick-slider/pull_requests and make sure that the tests pass for all supported Python versions.

Tips

To run a subset of tests:

$ python -m unittest tests.test_djangocms_slick_slider

Credits

Development Lead

Contributors

None yet. Why not be the first?

History

0.5.0 (2018-02-01)

  • Made title and settings not required anymore
  • Added support for multiple sliders on one page
  • Fixed bug, which made arrow color option not work
  • reworked the example project so you can use it with preconfigured data
  • changed default arrow color to a darker gray (#666)

0.2.4 (2017-10-13)

  • fixed jsonfield default error due to encoding

0.2.2 (2017-10-13)

  • bug fixes that caused whitenoise to crash due to relative paths

0.2.1 (2017-10-13)

  • bug fixes that cause the slider not to show up
  • better python 3 compatibility

0.2.0 (2017-10-13)

  • major database change
  • fixed many bugs
  • you need to completey delete the old db and use the new one

0.1.4 (2017-10-13)

  • changed structure of settings

0.1.2 (2017-10-13)

  • added django-cms as dependency to pypi package (setup.py)

0.1.1 (2017-10-12)

  • fixed github link in setup.py

0.1.0 (2017-10-12)

  • First release on PyPI.