7 Configuration
j edited this page 2019-12-19 18:07:30 +00:00

Pan.do/ra configuration

settings_local.py

located at /srv/pandora/pandora/local_settings.py

  • your database connection, i.e.:
    DATABASES = {
        'default': {
            'NAME': 'pandora',
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'USER': '',
            'PASSWORD': '',
        }
    }
  • celery settings
    BROKER_PORT = 5672
    BROKER_USER = "pandora"
    BROKER_PASSWORD = ""
    BROKER_VHOST = "/pandora"

  • location of site.jsonc
    SITE_CONFIG = '/srv/pandora/pandora/SITENAME.jsonc'
  • use an external data service, i.e.:
DATA_SERVICE = 'https://data.0xdb.org/api/'
  • webserver integration:

  • nginx:

    XACCELREDIRECT = True
  • apache:
    XSENDFILE = True
  • serve videos from other domain. to avoid some issues with browsers or for other reasons you might want to use another domain for your videos. several variables are expanded from the prefix: {uid}, {uid42}, {id}, {part}
    VIDEO_PREFIX = "//video{uid}.pad.ma"
    SESSION_COOKIE_DOMAIN = ".pad.ma"
  • enable debug output in http responds, otherwise a traceback will be available in Debug->View Logs... for admins
    DEBUG=False

config.jsonc

sudo -u pandora /srv/pandora/update.py db
/srv/pandora/ctl reload

poster/icon scripts

if you customize your scripts, replace poster.py, item_icon.py or list_icon.py with your version.

logo, icon

to customize your sites logo, icon replace static/png/logo.png or static/png/icon.png

customize views

you can customize views or javascript files. i.e. to customize the welcome screen, copy static/js/pandora/home.js to static/js/pandora/home.SITEID.js (SITEID as defined in config.jsonc site.id) and change it. once you are done, run manage.py update_static