Use home directory as default path for database and web root

issue4488
review26421002
This commit is contained in:
Xavier Codinas
2016-06-27 19:08:35 +02:00
parent 1265f7c42f
commit b829b3f13b
3 changed files with 6 additions and 4 deletions
+1
View File
@@ -1,3 +1,4 @@
* Use home directory as default path for database and web root.
* Add count option on Action Window Domains
* Remove window_name on Action Window
* Return the calling keyword in ActionKeyword.get_keywords
+2 -2
View File
@@ -52,7 +52,7 @@ root
Defines the root path served by `GET` requests.
Default: `/var/www/localhost/tryton`
Default: Under the `www` directory of user's home running `trytond`.
database
--------
@@ -95,7 +95,7 @@ path
The directory where Tryton stores files and so the user running `trytond`
must have write access on this directory.
Default: `/var/lib/trytond/`
Default: The db folder under the user home directory running `trytond`.
list
~~~~
+3 -2
View File
@@ -43,11 +43,12 @@ class TrytonConfigParser(ConfigParser.RawConfigParser):
ConfigParser.RawConfigParser.__init__(self)
self.add_section('web')
self.set('web', 'listen', 'localhost:8000')
self.set('web', 'root', '/var/www/localhost/tryton')
self.set('web', 'root', os.path.join(os.path.expanduser('~'), 'www'))
self.add_section('database')
self.set('database', 'uri',
os.environ.get('TRYTOND_DATABASE_URI', 'sqlite://'))
self.set('database', 'path', '/var/lib/trytond')
self.set('database', 'path', os.path.join(
os.path.expanduser('~'), 'db'))
self.set('database', 'list', 'True')
self.set('database', 'retry', 5)
self.set('database', 'language', 'en_US')