Settings options

DJFacet can be customised by setting a number of predefined variables in your settings.py file.

Note

If you do not set this variables explicitly, they’ll get a default value as specified below (which in most situations will work just fine).

DJ_SPECS_MODULE

Defaults to 'facetspecs'.

It determines what file name the configuration file has, and where it is located.

By default, DJFacet expects to find the configuration file (djfacetspecs.py) at the root of your django project, that is, where your setting.py file is. In general, you shouldn’t need to change this setting.

DJ_SHOWLOGS

Defaults to False.

It determines whether the logs DJFacet produces should be printed out in the shell. To be used only in development mode.

DJFACET_COUNT

Defaults to True.

It determines whether the count for the zoom-points in the facets must be calculated, or not.

If your application has a lot of data (and facets), setting this value to False can be useful for testing, since it will speed up considerably the refresh operation.

DJFACET_CACHE

Defaults to False.

It determines whether the Cache is used or not.

Once the cache is activated, DJFacet will always attempt to refresh the facets using the values stored in the database, instead of calculating them each time. Note that if the system detects unsaved objects, it caches them on-the-fly. Alternatively, you can cache all facets-contents using the appropriate management command (see the Management commands section).

Warning

If this parameter is set to True, you must have created the cached Faceted-Manager object using the appropriate management command (see the Management commands section).

DJFACET_AJAX

Defaults to False.

It determines whether the user interface should update the facets values asynchronously, or not.

If set to True, each of the facets in your search interface will become an html <div> element that can be opened or close. When opened, the back-end is called and its contents are refreshed via ajax.

DJ_MAX_RESULTS_PER_PAGE

Defaults to 50.

It determines the max number of results that a faceted search should display. The rest of the results will be paginated accordingly (see the The Template system section for more details).

DJ_2COLUMNS_INNERFACET

Defaults to False.

It determines whether the two-columns html template should be used for rendering the list of terms within a facet (see the The Template system section for more details).

Table Of Contents

Previous topic

Installation

Next topic

Configuration

This Page