Changeset - 0f3a584edcb3
[Not reviewed]
stable
0 2 0
Mads Kiilerich - 5 years ago 2020-05-22 15:10:00
mads@kiilerich.com
ini: explain how % must be escaped as %% (Issue #375)

Gearbox / paste would fail with:
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '('

The special handling of % is standard configparser behaviour, unless explicitly
fetching raw settings.
2 files changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
###################################################################################
 
###################################################################################
 
## Kallithea config file generated with kallithea-config                         ##
 
##                                                                               ##
 
## The %(here)s variable will be replaced with the parent directory of this file ##
 
## The %(here)s variable will generally be replaced with the parent directory of ##
 
## this file. Other use of % must be escaped as %% .                             ##
 
###################################################################################
 
###################################################################################
 

	
 
[DEFAULT]
 

	
 
################################################################################
 
## Email settings                                                             ##
 
##                                                                            ##
 
## Refer to the documentation ("Email settings") for more details.            ##
 
##                                                                            ##
 
## It is recommended to use a valid sender address that passes access         ##
 
## validation and spam filtering in mail servers.                             ##
 
################################################################################
 

	
 
## 'From' header for application emails. You can optionally add a name.
 
## Default:
 
#app_email_from = Kallithea
 
## Examples:
 
#app_email_from = Kallithea <kallithea-noreply@example.com>
 
#app_email_from = kallithea-noreply@example.com
 

	
 
## Subject prefix for application emails.
 
## A space between this prefix and the real subject is automatically added.
 
## Default:
 
#email_prefix =
 
## Example:
 
#email_prefix = [Kallithea]
 

	
 
## Recipients for error emails and fallback recipients of application mails.
 
## Multiple addresses can be specified, comma-separated.
 
## Only addresses are allowed, do not add any name part.
 
## Default:
 
#email_to =
 
## Examples:
 
#email_to = admin@example.com
 
#email_to = admin@example.com,another_admin@example.com
 
email_to =
 

	
 
## 'From' header for error emails. You can optionally add a name.
 
## Default: (none)
 
## Examples:
 
#error_email_from = Kallithea Errors <kallithea-noreply@example.com>
 
#error_email_from = kallithea_errors@example.com
 
error_email_from =
 

	
 
## SMTP server settings
 
## If specifying credentials, make sure to use secure connections.
 
## Default: Send unencrypted unauthenticated mails to the specified smtp_server.
 
## For "SSL", use smtp_use_ssl = true and smtp_port = 465.
 
## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.
 
smtp_server =
 
smtp_username =
 
smtp_password =
 
smtp_port =
 
smtp_use_ssl = false
 
smtp_use_tls = false
 

	
 
## Entry point for 'gearbox serve'
 
[server:main]
 
#host = 127.0.0.1
 
host = 0.0.0.0
 
port = 5000
 

	
 
## WAITRESS ##
 
use = egg:waitress#main
 
## number of worker threads
 
threads = 1
 
## MAX BODY SIZE 100GB
 
max_request_body_size = 107374182400
 
## use poll instead of select, fixes fd limits, may not work on old
 
## windows systems.
 
#asyncore_use_poll = True
 

	
 
## middleware for hosting the WSGI application under a URL prefix
 
#[filter:proxy-prefix]
 
#use = egg:PasteDeploy#prefix
 
#prefix = /<your-prefix>
 

	
 
[app:main]
 
use = egg:kallithea
 
## enable proxy prefix middleware
 
#filter-with = proxy-prefix
 

	
 
full_stack = true
 
static_files = true
 

	
 
## Internationalization (see setup documentation for details)
 
## By default, the languages requested by the browser are used if available, with English as default.
 
## Set i18n.enabled=false to disable automatic language choice.
 
#i18n.enabled = true
 
## To Force a language, set i18n.enabled=false and specify the language in i18n.lang.
 
## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo
 
#i18n.lang = en
 

	
 
cache_dir = %(here)s/data
 
index_dir = %(here)s/data/index
kallithea/lib/paster_commands/template.ini.mako
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%text>##</%text>#################################################################################
 
<%text>##</%text>#################################################################################
 
<%text>##</%text> Kallithea config file generated with kallithea-config ${'%-24s' % version    }##
 
<%text>##</%text>                                                                               ##
 
<%text>##</%text> The %(here)s variable will be replaced with the parent directory of this file ##
 
<%text>##</%text> The %(here)s variable will generally be replaced with the parent directory of ##
 
<%text>##</%text> this file. Other use of % must be escaped as %% .                             ##
 
<%text>##</%text>#################################################################################
 
<%text>##</%text>#################################################################################
 

	
 
[DEFAULT]
 

	
 
<%text>##</%text>##############################################################################
 
<%text>##</%text> Email settings                                                             ##
 
<%text>##</%text>                                                                            ##
 
<%text>##</%text> Refer to the documentation ("Email settings") for more details.            ##
 
<%text>##</%text>                                                                            ##
 
<%text>##</%text> It is recommended to use a valid sender address that passes access         ##
 
<%text>##</%text> validation and spam filtering in mail servers.                             ##
 
<%text>##</%text>##############################################################################
 

	
 
<%text>##</%text> 'From' header for application emails. You can optionally add a name.
 
<%text>##</%text> Default:
 
#app_email_from = Kallithea
 
<%text>##</%text> Examples:
 
#app_email_from = Kallithea <kallithea-noreply@example.com>
 
#app_email_from = kallithea-noreply@example.com
 

	
 
<%text>##</%text> Subject prefix for application emails.
 
<%text>##</%text> A space between this prefix and the real subject is automatically added.
 
<%text>##</%text> Default:
 
#email_prefix =
 
<%text>##</%text> Example:
 
#email_prefix = [Kallithea]
 

	
 
<%text>##</%text> Recipients for error emails and fallback recipients of application mails.
 
<%text>##</%text> Multiple addresses can be specified, comma-separated.
 
<%text>##</%text> Only addresses are allowed, do not add any name part.
 
<%text>##</%text> Default:
 
#email_to =
 
<%text>##</%text> Examples:
 
#email_to = admin@example.com
 
#email_to = admin@example.com,another_admin@example.com
 
email_to =
 

	
 
<%text>##</%text> 'From' header for error emails. You can optionally add a name.
 
<%text>##</%text> Default: (none)
 
<%text>##</%text> Examples:
 
#error_email_from = Kallithea Errors <kallithea-noreply@example.com>
 
#error_email_from = kallithea_errors@example.com
 
error_email_from =
 

	
 
<%text>##</%text> SMTP server settings
 
<%text>##</%text> If specifying credentials, make sure to use secure connections.
 
<%text>##</%text> Default: Send unencrypted unauthenticated mails to the specified smtp_server.
 
<%text>##</%text> For "SSL", use smtp_use_ssl = true and smtp_port = 465.
 
<%text>##</%text> For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.
 
smtp_server =
 
smtp_username =
 
smtp_password =
 
smtp_port =
 
smtp_use_ssl = false
 
smtp_use_tls = false
 

	
 
%if http_server != 'uwsgi':
 
<%text>##</%text> Entry point for 'gearbox serve'
 
[server:main]
 
host = ${host}
 
port = ${port}
 

	
 
%if http_server == 'gearbox':
 
<%text>##</%text> Gearbox default web server ##
 
use = egg:gearbox#wsgiref
 
<%text>##</%text> nr of worker threads to spawn
 
threadpool_workers = 1
 
<%text>##</%text> max request before thread respawn
 
threadpool_max_requests = 100
 
<%text>##</%text> option to use threads of process
 
use_threadpool = true
 

	
 
%elif http_server == 'gevent':
 
<%text>##</%text> Gearbox gevent web server ##
 
use = egg:gearbox#gevent
 

	
 
%elif http_server == 'waitress':
 
<%text>##</%text> WAITRESS ##
 
use = egg:waitress#main
 
<%text>##</%text> number of worker threads
 
threads = 1
 
<%text>##</%text> MAX BODY SIZE 100GB
 
max_request_body_size = 107374182400
 
<%text>##</%text> use poll instead of select, fixes fd limits, may not work on old
 
<%text>##</%text> windows systems.
 
#asyncore_use_poll = True
 

	
 
%elif http_server == 'gunicorn':
 
<%text>##</%text> GUNICORN ##
 
use = egg:gunicorn#main
 
<%text>##</%text> number of process workers. You must set `instance_id = *` when this option
 
<%text>##</%text> is set to more than one worker
 
workers = 4
 
<%text>##</%text> process name
 
proc_name = kallithea
0 comments (0 inline, 0 general)