2012-05-07 10:06:09 +04:00
|
|
|
#!/usr/bin/env python
|
2015-05-10 20:19:02 +03:00
|
|
|
# coding: utf-8
|
|
|
|
|
2017-05-18 07:41:34 +03:00
|
|
|
|
2012-05-06 21:24:46 +04:00
|
|
|
|
2012-05-14 19:17:49 +04:00
|
|
|
|
|
|
|
######## NOT SETTINGS, JUST BOILER PLATE ##############
|
2012-05-06 21:24:46 +04:00
|
|
|
import os
|
|
|
|
|
2015-05-10 20:47:59 +03:00
|
|
|
VERSION = '0.5'
|
2012-05-14 19:17:49 +04:00
|
|
|
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
LIBS_DIR = os.path.join(os.path.dirname(ROOT_DIR), 'libs')
|
|
|
|
|
|
|
|
######## END OF BOILER PLATE ##############
|
2012-05-06 21:24:46 +04:00
|
|
|
|
|
|
|
# debug will get you error message and auto reload
|
|
|
|
# don't set this to True in production
|
|
|
|
DEBUG = False
|
|
|
|
|
2012-05-14 19:17:49 +04:00
|
|
|
# Should the application serve static files on it's own ?
|
|
|
|
# IF yes, set the absolute path to the static files.
|
|
|
|
# If no, set it to None
|
|
|
|
# In dev this is handy, in prod you probably want the HTTP servers
|
|
|
|
# to serve it, but it's OK for small traffic to set it to True in prod too.
|
|
|
|
STATIC_FILES_ROOT = os.path.join(ROOT_DIR, 'static')
|
|
|
|
|
2012-05-17 13:13:40 +04:00
|
|
|
# If True, will link the compressed verion of the js and css files,
|
|
|
|
# otherwise, will use the ordinary files
|
2012-05-18 16:29:52 +04:00
|
|
|
COMPRESSED_STATIC_FILES = False
|
2012-05-17 13:13:40 +04:00
|
|
|
|
2012-05-06 21:24:46 +04:00
|
|
|
# absolute path where the paste files should be store
|
|
|
|
# default in projectdirectory/static/content/
|
|
|
|
# use "/" even under Windows
|
|
|
|
PASTE_FILES_ROOT = os.path.join(STATIC_FILES_ROOT, 'content')
|
|
|
|
|
2012-05-14 19:17:49 +04:00
|
|
|
# a tuple of absolute paths of directory where to look the template for
|
|
|
|
# the first one will be the first to be looked into
|
|
|
|
# if you want to override a template, create a new dir, write the
|
|
|
|
# template with the same name as the one you want to override in it
|
|
|
|
# then add the dir path at the top of this tuple
|
|
|
|
TEMPLATE_DIRS = (
|
|
|
|
os.path.join(ROOT_DIR, 'views'),
|
|
|
|
)
|
|
|
|
|
2012-05-06 21:24:46 +04:00
|
|
|
# Port and host the embeded python server should be using
|
|
|
|
# You can also specify them using the --host and --port script options
|
|
|
|
# which have priority on these settings
|
|
|
|
HOST = "127.0.0.1"
|
2012-05-12 12:33:01 +04:00
|
|
|
PORT = "8000"
|
2012-05-06 21:24:46 +04:00
|
|
|
|
|
|
|
# User and group the server should run as. Set to None if it should be the
|
|
|
|
# current user. Some OS don't support it and if so, it will be ignored.
|
|
|
|
USER = None
|
|
|
|
GROUP = None
|
|
|
|
|
2012-05-21 20:21:06 +04:00
|
|
|
# Display a tiny counter for pastes created.
|
2012-05-21 19:14:01 +04:00
|
|
|
# Be carreful if your site have to many pastes this can hurt your hard drive performances.
|
2012-05-21 20:21:06 +04:00
|
|
|
# Refresh counter interval. Default to every minute after a paste.
|
2012-05-21 19:14:01 +04:00
|
|
|
DISPLAY_COUNTER = True
|
2012-05-21 23:48:21 +04:00
|
|
|
REFRESH_COUNTER = 60 * 1
|
2012-05-21 19:14:01 +04:00
|
|
|
|
2012-05-08 14:52:17 +04:00
|
|
|
# Names/links to insert in the menu bar.
|
|
|
|
# Any link with "mailto:" will be escaped to prevent spam
|
|
|
|
MENU = (
|
|
|
|
('Home', '/'), # internal link. First link will be highlited
|
|
|
|
('Download 0bin', 'https://github.com/sametmax/0bin'), # external link
|
2012-05-21 14:25:24 +04:00
|
|
|
('Faq', '/faq/'), # faq
|
2012-05-08 14:52:17 +04:00
|
|
|
('Contact', 'mailto:your@email.com') # email
|
|
|
|
)
|
|
|
|
|
2013-03-03 20:27:39 +04:00
|
|
|
# limit size of pasted text in bytes. Be careful allowing too much size can
|
2012-05-18 16:29:52 +04:00
|
|
|
# slow down user's browser
|
2012-05-06 21:24:46 +04:00
|
|
|
MAX_SIZE = 1024 * 500
|
2013-04-29 22:17:37 +04:00
|
|
|
|
|
|
|
# length of base64-like paste-id string in the url, int from 4 to 27 (length of sha1 digest)
|
|
|
|
# total number of unique pastes can be calculated as 2^(6*PASTE_ID_LENGTH)
|
|
|
|
# for PASTE_ID_LENGTH=8, for example, it's 2^(6*8) = 281 474 976 710 656
|
|
|
|
PASTE_ID_LENGTH = 8
|