Source

cmsplugin-gallery / docs / quickstart.rst

Full commit

Quick start guide

Basic configuration

For a more detailed guide on how to configure cmsplugin-gallery, please consult :ref:`the configuration section <configuration>`.

Prerequisites

In order to use cmsplugin-gallery you obviously need to have setup and configured django and django-cms. If you didn't yet, please refer to the Django documentation and the Django-cms documentation.

Required settings

The only required operation in your settings file is to add easy_thumbnails and cmsplugin_gallery to INSTALLED_APPS like this:

INSTALLED_APPS = (
    # you installed applications here
    # ...

    'easy_thumbnails',
    'cmsplugin_gallery',
)

Setting up the database

To set up the tables that cmsplugin-gallery uses you'll need to type:

python manage.py syncdb

Setting up your templates

It is recommended that you add two template blocks in your base template:
  • cmsplugin_gallery_css
  • cmsplugin_gallery_js

For example, your base template could look like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="fr">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Example</title>
    {% block cmsplugin_gallery_css %}{% endblock %}
    {% block cmsplugin_gallery_js %}{% endblock %}
</head>
<body>
    {% block content %}{% endblock %}
</body>
</html>

You're done !

Congrats! At this point you should have a working installation of cmsplugin-gallery. Now you can just login to your admin site and add a gallery to one of your CMS pages.

cmsplugin-gallery is fully customizable, but this is out of the scope of this quickstart. To learn how to customize cmsplugin-gallery please read :ref:`the customization section<customization>`.