.. _ref-settings:

==========================
Merengue specific settings
==========================

.. contents::
    :local:
    :depth: 1

Available settings
==================

Here's a full list of all available merengue settings. All these settings are
defined in `merengue/settings.py`_ and can be overriden in your project
settings.

.. _merengue/settings.py: http://tracpub.yaco.es/merengue/browser/trunk/merengueproj/merengue/settings.py

.. setting:: SITE_FIXTURES

SITE_FIXTURES
-------------

Default: ``{}`` (Empty dictionary)

A dictionary mapping with fixtures to load for every application
It will executed after migrating (with south) models for every application.
Example:

.. code-block:: python

    SITE_FIXTURES = {
        'blog': ('blogs_data.xml', )
        'news': ('news_data.xml', 'news_users.json', )
    }

In this example, after migrate 'news' application Merengue will load
``news_data.xml`` and ``news_users.json``, located in one of `settings.FIXTURE_DIRS`_.

.. _settings.FIXTURE_DIRS: http://docs.djangoproject.com/en/1.1/ref/settings/#fixture-dirs

MERENGUE_URLS_PREFIX
--------------------

Default: ``cms``

It will be the prefix for all URLs managed by merengue.

In your project ``urls.py`` file, merengue URLs are included as follows:

.. code-block:: python

    # merengue URLs
    (r'^%s/' % settings.MERENGUE_URLS_PREFIX, include('merengue.urls')),

You can override this settings if you prefer other prefix than ``cms``.

CACHE_BACKEND
-------------

Default: ``johnny.backends.locmem:///``

``CACHE_BACKEND`` is not a Merengue settings but a `Django one`_, but we mention
that settings because Merengue uses `Johnny Cache`_ as smart caching manager.

This implies you have to prepend ``johnny.backends.`` to your project caching
backends in order to get it works with ``johnny-cache`` (see
`Johnny Cache backends`_). Example:

.. code-block:: python

    CACHE_BACKEND = 'johnny.backends.memcached://127.0.0.1:11211/'

.. _Django one: http://docs.djangoproject.com/en/1.1/ref/settings/#cache-backend
.. _Johnny Cache: http://packages.python.org/johnny-cache/
.. _Johnny Cache backends: http://packages.python.org/johnny-cache/backends.html

TINYMCE_EXTRA_MEDIA
-------------------

Default: ``{ 'js': [], 'css': [] }``

Sometimes is useful for your site add extra CSS or Javascript files inside
Merengue HTML editor (TinyMCE). This would be useful to add your public styles
into HTML editor to be even more WYSIWYG.

You need include all media without ``MEDIA_URL`` prefix. This is an example:

.. code-block:: python

    TINYMCE_EXTRA_MEDIA = {
        'js': [],
        'css': ['themes/yourtheme/css/layout.css'],
    }

(( to be completed ))