Settings

Inyoka is highly configurable. The following list shows the most important setting variables. To use them, add the following line into your script:

from django.conf import settings

Every configuration directive can be overridden by using a custom settings file (see example_development_settings.py) and setting the DJANGO_SETTINGS_MODULE environment variable:

$ export DJANGO_SETTINGS_MODULE="settings"

Any settings variable that is shown in the Django settings documentation can be used.

The development, test and production configuration files should start with:

from inyoka.default_settings import *

This file is not referenced by the application code itself which means that you can import it as part of the Django setup without causing circular bootstrapping dependencies.

Generics

CACHES

Defaults to:

{
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
    },
    'request': {
        'BACKEND': 'inyoka.utils.cache.RequestCache',
    }
}

The caches that will be used by Inyoka and Django. See https://docs.djangoproject.com/en/4.2/ref/settings/#caches

DATABASES

Defaults to:

{
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'database.db',
    },
}

Defines the available databases. See https://docs.djangoproject.com/en/4.2/ref/settings/#databases

DEBUG

Defaults to: False

Enable or disable debugging. See https://docs.djangoproject.com/en/4.2/ref/settings/#DEBUG

DEBUG_PROPAGATE_EXCEPTIONS

Defaults to: False

Enable or disable Django to push exceptions to a higher level. See https://docs.djangoproject.com/en/4.2/ref/settings/#debug-propagate-exceptions

FILE_UPLOAD_HANDLERS

Defaults to:

(
    'django.core.files.uploadhandler.MemoryFileUploadHandler',
)

We only allow uploads via memory up to 2.5mb and do not stream into temporary files. See https://docs.djangoproject.com/en/4.2/ref/settings/#file-upload-handlers

Installation settings

Forum

FORUM_LIMIT_UNREAD

Defaults to: 100

FORUM_OWNPOST_DELETE_LIMIT

Defaults to: (0, 0)

Time in seconds after posting a user is allowed to delete his own posts, for posts (w/o, w/) replies. -1 for infinitely, 0 for never

FORUM_OWNPOST_EDIT_LIMIT

Defaults to: (-1, 1800)

Time in seconds after posting a user is allowed to edit his own posts, for posts (w/o, w/) replies. -1 for infinitely, 0 for never

FORUM_THUMBNAIL_SIZE

Defaults to: (64, 64)

General

ACTIVATION_HOURS

Defaults to: 48

Hours for a user to activate the account

AVAILABLE_FEED_COUNTS

Defaults to:

{
    None: (10, 25),
    'ikhaya_feed_article': (10, 20, 25),
    'ikhaya_feed_comment': (10, 20, 25),
    'forum_topic_feed': (10, 20, 25, 50),
    'forum_forum_feed': (10, 20, 25, 50, 75, 100),
    'planet_feed': (10, 20, 25, 50),
    'wiki_feed': (10, 20),
}
ANONYMOUS_USER_NAME

Defaults to: 'anonymous'

INYOKA_CONTACT_EMAIL

Defaults to: 'contact@example.com'

See also

BASE_DOMAIN_NAME

INYOKA_SYSTEM_USER

Defaults to: 'example.com'

See also

BASE_DOMAIN_NAME

INYOKA_SYSTEM_USER_EMAIL

Defaults to: 'system@example.com'

See also

BASE_DOMAIN_NAME

USER_INACTIVE_DAYS

Defaults to: 365

Days to describe an inactive user

Wiki

WIKI_DISCUSSION_FORUM

Defaults to: 'discussions'

The forum that should contain the wiki discussions

WIKI_MAIN_PAGE

Defaults to: 'Welcome'

Wiki settings

WIKI_TEMPLATE_BASE

Defaults to: 'Wiki/Templates'

The page below we have our templates. The template the user specifies in the macro or in the parser is then joined with this page name according to our weird joining rules

Localization and internationalization

LANGUAGE_CODE

Defaults to: 'de-de'

Language code for this installation. All choices can be found here: http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes

TIME_ZONE

Defaults to: None

Local time zone for this installation. Choices can be found here: http://en.wikipedia.org/wiki/List_of_tz_zones_by_name . Although not all choices may be available on all operating systems. The setting here has nothing to do with the timezone the user is in.

We set the TIME_ZONE to None on default so that Django does not issue time zone aware columns on PostgreSQL. This finally should fix the last standing bugs regarding PostgreSQL.

USE_I18N

Defaults to: True

If you set this to False, Django will make some optimizations so as not to load the internationalization machinery.

USE_L10N

Defaults to: True

Logging

SENTRY_SITE

Defaults to: 'example.com'

Set the default sentry site

See also

BASE_DOMAIN_NAME

Notification

DEBUG_NOTIFICATIONS

Defaults to: False

Print a short message to STDOUT for each notification that is send by mail.

EMAIL_SUBJECT_PREFIX

Defaults to: 'example.com: '

Prefix for the system mails

See also

BASE_DOMAIN_NAME

Paths and URLs

BASE_DOMAIN_NAME

Defaults to: 'example.com'

The base URL (without subdomain)

See also

BASE_DOMAIN_NAME

BASE_PATH

Defaults to: dirname(__file__)

Refers to the directory name of the Inyoka module. In case the __init__.py file is at ~/inyoka/inyoka/__init__.py, this refers to ~/inyoka/inyoka/. Do not override this option unless you know what you are doing. All paths are constructed by this value.

DEFAULT_HOST

Defaults to: 'portal'

LOCALE_PATHS

Defaults to: ('~/inyoka/inyoka/locale',)

See https://docs.djangoproject.com/en/4.2/ref/settings/#locale-paths

See also

BASE_PATH

MEDIA_ROOT

Defaults to: '~/inyoka/inyoka/media'

Absolute path to the directory that holds media and the URL. See https://docs.djangoproject.com/en/4.2/ref/settings/#media-root

See also

BASE_PATH

MEDIA_URL

Defaults to: 'http://media.example.com'

See https://docs.djangoproject.com/en/4.2/ref/settings/#media-url

See also

BASE_DOMAIN_NAME

ROOT_HOSTCONF

Defaults to: 'inyoka.hosts'

Host conf for subdomain dispatching

ROOT_URLCONF

Defaults to: 'inyoka.portal.urls'

This URL conf is used for contrib stuff like the auth system. See https://docs.djangoproject.com/en/4.2/ref/settings/#root-urlconf

Defaults to: '.example.com'

See https://docs.djangoproject.com/en/4.2/ref/settings/#session-cookie-domain

See also

BASE_DOMAIN_NAME

STATIC_ROOT

Defaults to: '~/inyoka/inyoka/static-collected'

See https://docs.djangoproject.com/en/4.2/ref/settings/#static-root

See also

BASE_PATH

STATIC_URL

Defaults to: 'http://static.example.com'

See https://docs.djangoproject.com/en/4.2/ref/settings/#static-url

See also

BASE_DOMAIN_NAME

Security

SECRET_KEY

Defaults to: None

Make this unique, and don’t share it with anybody. See https://docs.djangoproject.com/en/4.2/ref/settings/#secret-key