mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-05-02 03:02:23 +02:00
Replace the settings table with multiple sections. (#376)
It's easier to read, and easier to maintain. Fixes #251.
This commit is contained in:
parent
6ab92ddbac
commit
07aabeb07f
1 changed files with 72 additions and 42 deletions
|
@ -189,49 +189,79 @@ deployed instance, simply look at your *ihatemoney.cfg*.
|
||||||
|
|
||||||
Production values are recommended values for use in production.
|
Production values are recommended values for use in production.
|
||||||
|
|
||||||
|
`SQLALCHEMY_DATABASE_URI`
|
||||||
|
-------------------------
|
||||||
|
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
Specifies the type of backend to use and its location. More information on the
|
||||||
| Setting name | Default | What does it do? |
|
format used can be found on `the SQLAlchemy documentation`_.
|
||||||
+===============================+=================================+========================================================================================+
|
|
||||||
| SQLALCHEMY_DATABASE_URI | ``sqlite:///tmp/ihatemoney.db`` | Specifies the type of backend to use and its location. More information on the |
|
- **default value:** ``sqlite:///tmp/ihatemoney.db``
|
||||||
| | | format used can be found on `the SQLAlchemy documentation`_. |
|
- **Production value:** Set it to some path on your disk. Typically
|
||||||
| | | |
|
``sqlite:///home/ihatemoney/ihatemoney.db``. Do *not* store it under
|
||||||
| | | **Production value:** Set it to some path on your disk. Typically |
|
``/tmp`` as this folder is cleared at each boot.
|
||||||
| | | ``sqlite:///home/ihatemoney/ihatemoney.db``. Do *not* store it under ``/tmp`` as this |
|
|
||||||
| | | folder is cleared at each boot. |
|
`SECRET_KEY`
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
------------
|
||||||
| SECRET_KEY | ``tralala`` | The secret key used to encrypt the cookies. |
|
|
||||||
| | | |
|
The secret key used to encrypt the cookies.
|
||||||
| | | **Production value:** `ihatemoney conf-example ihatemoney.cfg` sets it to something |
|
|
||||||
| | | random, which is good. |
|
- **Production value:** `ihatemoney conf-example ihatemoney.cfg` sets it to
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
something random, which is good.
|
||||||
| MAIL_DEFAULT_SENDER | ``("Budget manager", | A python tuple describing the name and email address to use when sending |
|
|
||||||
| | "budget@notmyidea.org")`` | emails. |
|
`MAIL_DEFAULT_SENDER`
|
||||||
| | | |
|
---------------------
|
||||||
| | | **Production value:** Any tuple you want. |
|
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
A python tuple describing the name and email address to use when sending emails.
|
||||||
| ACTIVATE_DEMO_PROJECT | ``True`` | If set to `True`, a demo project will be available on the frontpage. |
|
|
||||||
| | | |
|
- **Default value:** ``("Budget manager", "budget@notmyidea.org")``
|
||||||
| | | **Production value:** Usually, you will want to set it to ``False`` for a private |
|
- **Production value:** Any tuple you want.
|
||||||
| | | instance. |
|
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
`ACTIVATE_DEMO_PROJECT`
|
||||||
| | | Hashed password to access protected endpoints. If left empty, all administrative |
|
-----------------------
|
||||||
| ADMIN_PASSWORD | ``""`` | tasks are disabled. |
|
|
||||||
| | | |
|
If set to `True`, a demo project will be available on the frontpage.
|
||||||
| | | **Production value:** To generate the proper password HASH, use |
|
|
||||||
| | | ``ihatemoney generate_password_hash`` and copy the output into the value of |
|
- **Default value:** ``True``
|
||||||
| | | *ADMIN_PASSWORD*. |
|
- **Production value:** Usually, you will want to set it to ``False`` for a
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
private instance.
|
||||||
| ALLOW_PUBLIC_PROJECT_CREATION | ``True`` | If set to ``True``, everyone can create a project without entering the admin password |
|
|
||||||
| | | If set to ``False``, the password needs to be entered (and as such, defined in the |
|
`ADMIN_PASSWORD`
|
||||||
| | | settings). |
|
----------------
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
|
||||||
| ACTIVATE_ADMIN_DASHBOARD | ``False`` | If set to `True`, the dashboard will become accessible entering the admin password |
|
Hashed password to access protected endpoints. If left empty, all administrative
|
||||||
| | | If set to `True`, a non empty ADMIN_PASSWORD needs to be set |
|
tasks are disabled.
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
|
||||||
| APPLICATION_ROOT | ``""`` | If empty, ihatemoney will be served at domain root (e.g: *http://domain.tld*), if set |
|
- **Default value:** ``""`` (empty string)
|
||||||
| | | to ``"foo"``, it will be served from a "folder" (e.g: *http://domain.tld/foo*) |
|
- **Production value:** To generate the proper password HASH, use
|
||||||
+-------------------------------+---------------------------------+----------------------------------------------------------------------------------------+
|
``ihatemoney generate_password_hash`` and copy the output into the value of
|
||||||
|
*ADMIN_PASSWORD*.
|
||||||
|
|
||||||
|
`ALLOW_PUBLIC_PROJECT_CREATION`
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
If set to ``True``, everyone can create a project without entering the admin
|
||||||
|
password. If set to ``False``, the password needs to be entered (and as such,
|
||||||
|
defined in the settings).
|
||||||
|
|
||||||
|
- **Default value:** : ``True``.
|
||||||
|
|
||||||
|
|
||||||
|
`ACTIVATE_ADMIN_DASHBOARD`
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
If set to `True`, the dashboard will become accessible entering the admin
|
||||||
|
password, if set to `True`, a non empty ADMIN_PASSWORD needs to be set.
|
||||||
|
|
||||||
|
- **Default value**: ``False``
|
||||||
|
|
||||||
|
`APPLICATION_ROOT`
|
||||||
|
------------------
|
||||||
|
|
||||||
|
If empty, ihatemoney will be served at domain root (e.g: *http://domain.tld*),
|
||||||
|
if set to ``"somestring"``, it will be served from a "folder"
|
||||||
|
(e.g: *http://domain.tld/somestring*).
|
||||||
|
|
||||||
|
- **Default value:** ``""`` (empty string)
|
||||||
|
|
||||||
.. _the SQLAlchemy documentation: http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
|
.. _the SQLAlchemy documentation: http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue