Blame progit/default_config.py

Pierre-Yves Chibon 2088eb
#-*- coding: utf-8 -*-
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
"""
Pierre-Yves Chibon 2088eb
 (c) 2014 - Copyright Red Hat Inc
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
 Authors:
Pierre-Yves Chibon 2088eb
   Pierre-Yves Chibon <pingou@pingoured.fr></pingou@pingoured.fr>
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
"""
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
import os
Pierre-Yves Chibon ee7375
from datetime import timedelta
Pierre-Yves Chibon ee7375
Pierre-Yves Chibon ee7375
Pierre-Yves Chibon ee7375
# Set the time after which the session expires
Pierre-Yves Chibon ee7375
PERMANENT_SESSION_LIFETIME = timedelta(hours=1)
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 43b199
# secret key used to generate unique csrf token
Pierre-Yves Chibon 43b199
SECRET_KEY = '<insert here="" key="" own="" your="">'</insert>
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
# url to the database server:
Pierre-Yves Chibon 2088eb
DB_URL = 'sqlite:////var/tmp/progit_dev.sqlite'
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 767d71
# The FAS group in which the admin of progit are
Pierre-Yves Chibon 31f563
ADMIN_GROUP = 'sysadmin-main'
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
# The email address to which the flask.log will send the errors (tracebacks)
Pierre-Yves Chibon 2088eb
EMAIL_ERROR = 'pingou@pingoured.fr'
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
# The URL at which the project is available.
Pierre-Yves Chibon 36e0be
APP_URL = 'https://fedorahosted.org/progit/'
Pierre-Yves Chibon 36e0be
Pierre-Yves Chibon 36e0be
# The URL to use to clone the git repositories.
Pierre-Yves Chibon 0aaef7
GIT_URL_SSH = 'git@progit.fedorahosted.org'
Pierre-Yves Chibon 0aaef7
GIT_URL_GIT = 'git://progit.fedorahosted.org'
Pierre-Yves Chibon 0aaef7
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
# Number of items displayed per page
Pierre-Yves Chibon 2088eb
ITEM_PER_PAGE = 50
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
# Folder containing to the git repos
Pierre-Yves Chibon 2088eb
GIT_FOLDER = os.path.join(
Pierre-Yves Chibon 2088eb
    os.path.abspath(os.path.dirname(__file__)),
Pierre-Yves Chibon 2088eb
    '..',
Pierre-Yves Chibon 2088eb
    'repos'
Pierre-Yves Chibon 2088eb
)
Pierre-Yves Chibon 2088eb
Pierre-Yves Chibon 2088eb
# Folder containing the forks repos
Pierre-Yves Chibon 2088eb
FORK_FOLDER = os.path.join(
Pierre-Yves Chibon 2088eb
    os.path.abspath(os.path.dirname(__file__)),
Pierre-Yves Chibon 2088eb
    '..',
Pierre-Yves Chibon 2088eb
    'forks'
Pierre-Yves Chibon 2088eb
)
Pierre-Yves Chibon 088a3b
Pierre-Yves Chibon 4b7a7d
# Folder containing the docs repos
Pierre-Yves Chibon 4b7a7d
DOCS_FOLDER = os.path.join(
Pierre-Yves Chibon 088a3b
    os.path.abspath(os.path.dirname(__file__)),
Pierre-Yves Chibon 088a3b
    '..',
Pierre-Yves Chibon 4b7a7d
    'docs'
Pierre-Yves Chibon 088a3b
)
Pierre-Yves Chibon 12ec09
Pierre-Yves Chibon c62356
# Folder containing the tickets repos
Pierre-Yves Chibon c62356
TICKETS_FOLDER = os.path.join(
Pierre-Yves Chibon c62356
    os.path.abspath(os.path.dirname(__file__)),
Pierre-Yves Chibon c62356
    '..',
Pierre-Yves Chibon c62356
    'tickets'
Pierre-Yves Chibon c62356
)
Pierre-Yves Chibon c62356
Pierre-Yves Chibon 12ec09
# Configuration file for gitolite
Pierre-Yves Chibon 12ec09
GITOLITE_CONFIG = os.path.join(
Pierre-Yves Chibon 12ec09
    os.path.abspath(os.path.dirname(__file__)),
Pierre-Yves Chibon 12ec09
    '..',
Pierre-Yves Chibon 12ec09
    'gitolite.conf'
Pierre-Yves Chibon 12ec09
)
Pierre-Yves Chibon fba7ed
Pierre-Yves Chibon fba7ed
# Home folder of the gitolite user -- Folder where to run gl-compile-conf from
Pierre-Yves Chibon fba7ed
GITOLITE_HOME = None
Pierre-Yves Chibon fba7ed
Pierre-Yves Chibon c19c0d
# Folder containing all the public ssh keys for gitolite
Pierre-Yves Chibon c19c0d
GITOLITE_KEYDIR = None
Pierre-Yves Chibon c19c0d
Pierre-Yves Chibon fba7ed
# Path to the gitolite.rc file
Pierre-Yves Chibon fba7ed
GL_RC = None
Pierre-Yves Chibon fba7ed
# Path to the /bin directory where the gitolite tools can be found
Pierre-Yves Chibon fba7ed
GL_BINDIR = None
Pierre-Yves Chibon c46e42
Pierre-Yves Chibon c46e42
Pierre-Yves Chibon c46e42
# Default SMTP server to use for sending emails
Pierre-Yves Chibon c46e42
SMTP_SERVER = 'localhost'
Pierre-Yves Chibon 2fc797
Pierre-Yves Chibon 2fc797
# Email used to sent emails
Pierre-Yves Chibon 2fc797
FROM_EMAIL = 'progit@fedoraproject.org'
Pierre-Yves Chibon 6c1b1f
Pierre-Yves Chibon 6c1b1f
# Specify which authentication method to use, defaults to `fas` can be or
Pierre-Yves Chibon 6c1b1f
# `local`
Pierre-Yves Chibon 6c1b1f
# Default: ``fas``.
Pierre-Yves Chibon 6c1b1f
PROGIT_AUTH = 'fas'
Pierre-Yves Chibon 6c1b1f
Pierre-Yves Chibon 6c1b1f
# When this is set to True, the session cookie will only be returned to the
Pierre-Yves Chibon 6c1b1f
# server via ssl (https). If you connect to the server via plain http, the
Pierre-Yves Chibon 6c1b1f
# cookie will not be sent. This prevents sniffing of the cookie contents.
Pierre-Yves Chibon 6c1b1f
# This may be set to False when testing your application but should always
Pierre-Yves Chibon 6c1b1f
# be set to True in production.
Pierre-Yves Chibon 6c1b1f
# Default: ``True``.
Pierre-Yves Chibon 6c1b1f
PROGIT_COOKIE_REQUIRES_HTTPS = False
Pierre-Yves Chibon 6c1b1f
Pierre-Yves Chibon 6c1b1f
# The name of the cookie used to store the session id.
Pierre-Yves Chibon 6c1b1f
# Default: ``.MirrorManager``.
Pierre-Yves Chibon 6c1b1f
PROGIT_COOKIE_NAME = 'progit'
Pierre-Yves Chibon 6c1b1f
Pierre-Yves Chibon 6c1b1f
# If not specified the application will rely on the root_url when sending
Pierre-Yves Chibon 6c1b1f
# emails, otherwise it will use this URL
Pierre-Yves Chibon 6c1b1f
# Default: ``None``.
Pierre-Yves Chibon 6c1b1f
APPLICATION_URL = None
Pierre-Yves Chibon 6c1b1f
Pierre-Yves Chibon 6c1b1f
# Boolean specifying wether to check the user's IP address when retrieving
Pierre-Yves Chibon 6c1b1f
# its session. This make things more secure (thus is on by default) but
Pierre-Yves Chibon 6c1b1f
# under certain setup it might not work (for example is there are proxies
Pierre-Yves Chibon 6c1b1f
# in front of the application).
Pierre-Yves Chibon 6c1b1f
CHECK_SESSION_IP = True
Johan Cwiklinski b930cf
Johan Cwiklinski b930cf
# Lenght for short commits ids or file hex
Johan Cwiklinski b930cf
SHORT_LENGTH = 6
Pierre-Yves Chibon 05bf52
Pierre-Yves Chibon 05bf52
# Make browsers send session cookie only via HTTPS
Pierre-Yves Chibon db25ca
SESSION_COOKIE_SECURE = False
Pierre-Yves Chibon fec88c
Pierre-Yves Chibon fec88c
# Used by SESSION_COOKIE_PATH
Pierre-Yves Chibon db25ca
APPLICATION_ROOT = '/'