* Add a @requires_admin decorator
It can be used to protect specific endpoints with ADMIN_PASSWORD
(a password that is stored unencrypted in the settings)
The decorator has no effect if ADMIN_PASSWORD is an empty string (default value)
* Require admin permissions to access create project endpoint
When ADMIN_PASSWORD is not empty, project creation form on the
home page will be replaced by a link to the create project endpoint
so one is able to enter the admin password before filling the form
It is a bare alias of StringField (thus, no alembic migration is required),
deprecated since wtforms v2.0 (2013).
Removes the following warning:
> DeprecationWarning: The TextField alias for StringField has been deprecated and will be removed in WTForms 3.0
Ref f07729dd45
- Adapt to BS4 class names and hierarchy
- Redesign some forms to have the label above the input (mobile-friendly)
- For the remaining inline form (add bill), use the grid, as BS no longer
provides inline form alignment helpers
Forms are not context related, thus translations are done only once if not done
in a lazy way. the fix is to use lazy_gettext rather than gettext. Fix#12
The only translation so far is french, but more can be added. The browser language
is used thanks to the HTTP languages headers.
There are still some problems with the translation of some strings, I don't know
why this is. See #12
- Send an email to the user with the summary of the created project
containing a reminder of the identifier, password and a link.
- Add flash message with the identifier in the /invite page/
- Add a small note containing the identifier in the upper right corner
of the project main page.
- Do not display anymore the identifier field in home.
- Let the user enter the id if the slug generated from project name already exists as a project id.
- Moved get_billform_for from 'utils' to 'forms', to avoid issue (was 'from forms import ...' into utils,
and 'from utils import ...' into forms, which causeed an error).