===================
Ella Listing system
===================

When you create a publishable object (``Article``, ``Gallery``, etc.) and wish
to actually publish it, you do that by creating an appropriate ``Listing``
model.

Every model can be published in any number of categories


URLs
====

Standard urls definitions to be used in any Ella-based application can be found in
``ella.core.urls``.

Object detail
-------------

By creating a ``Listing`` for an object in it's category it is assigned a URL.
The URL is in format::

    /path/to/category/year/month/day/content_type_name/object_slug/

Lists
-----

Miscelaneous lists of objects:

Objects of a given type in a category::

    /path/to/category/year/month/day/content_type_name/
    /path/to/category/year/month/content_type_name/
    /path/to/category/year/content_type_name/

Objects regrdless of type::

    /path/to/category/year/month/day/
    /path/to/category/year/month/
    /path/to/category/year/

Where:

    * ``/path/to/category/`` equals ``object.category.path`` (``/`` for root
      category)

    * ``year/month/day/`` is date when the object was published
      (``publish_from`` field on the object's ``Listing``)

    * ``content_type_name`` is the localized slugified name of the model
      (articles, galleries etc.)

Priorities
==========

In all the lists the objects are ordered by priority (``priority_value``) and
then by publish date (``publish_from``). Priority is active for a limited
period determined by an interval (``priority_from`` - ``priority_to``). If
``remove`` flag is set, the listing disappears completely after
``priority_to``.

Hiding object in lists
======================

Sometimes you may wish to create a listing for an object without it actually
appearing in any lists simply for the purpose of getting a URL. You can do
this only on main listing by setting the hidden attribute.

The listing is treated as usual with the exception of ``get_listing`` skips
it.

Displaying object lists
=======================

See templatetag ``listing``.

