Changeset - f79dff927ab9
[Not reviewed]
default
0 2 0
Mads Kiilerich (mads) - 6 years ago 2020-06-08 13:36:21
mads@kiilerich.com
Grafted from: e17fe149ba73
ini: change .ini template to include sqlalchemy.url examples for all database types

Rely less on users creating their initial .ini "correctly" with the right
database choice.
2 files changed with 12 insertions and 12 deletions:
0 comments (0 inline, 0 general)
development.ini
Show inline comments
 
@@ -359,10 +359,9 @@ logview.pylons.util = #eee
 
##      DB CONFIG      ##
 
#########################
 

	
 
## SQLITE [default]
 
sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
 

	
 
## see sqlalchemy docs for other backends
 
#sqlalchemy.url = postgresql://user:pass@localhost/kallithea
 
#sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
 

	
 
sqlalchemy.pool_recycle = 3600
 

	
kallithea/lib/paster_commands/template.ini.mako
Show inline comments
 
@@ -453,19 +453,20 @@ logview.pylons.util = #eee
 
<%text>##</%text>#######################
 

	
 
%if database_engine == 'sqlite':
 
<%text>##</%text> SQLITE [default]
 
sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
 

	
 
%elif database_engine == 'postgres':
 
<%text>##</%text> POSTGRESQL
 
%else:
 
#sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
 
%endif
 
%if database_engine == 'postgres':
 
sqlalchemy.url = postgresql://user:pass@localhost/kallithea
 

	
 
%elif database_engine == 'mysql':
 
<%text>##</%text> MySQL
 
%else:
 
#sqlalchemy.url = postgresql://user:pass@localhost/kallithea
 
%endif
 
%if database_engine == 'mysql':
 
sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
 

	
 
%else:
 
#sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
 
%endif
 
<%text>##</%text> see sqlalchemy docs for other backends
 

	
 
sqlalchemy.pool_recycle = 3600
 

	
0 comments (0 inline, 0 general)