For this I had to create an Jinja2 explicit environment, so I put a
function in `ihatemoney.utils.create_jinja2_env(strict_rendering=False)`.
When using this environment and if `strict_rendering` is activated,
templates using undefined variables will now error out rather than
failing silently.
The script was relying on the presence of an environment variable, which
is only set when the virtualenv is activated. But a virtualenv does not
have to be activated to work (it's possible to call the python command
directly).
This fixes it by relying on `sys.executable` which should be correct at
all times.
Fixes#306
* Rename manage.ConfigTemplate → manage.GenerateConfig
To be consistent with the CLI name: `generate-config`.
* Add tests for manage.py commands
* Run tests from pip-installed package
To be able to detect packaging-related issues on test runs.
refs #305
I've also renamed the templates to *.j2 in order to make things clearer
to others. Having extensions with the name of the locale doesn't seem to
be a good practice, and would need us to add the locales in the MANIFEST
file each time we add one.
Fix#305
* Enable basic auth passthrough for API
Added the couple of apache configuration lines necessary to get the basic authentication working for the API.
* Revert the addition of "AuthType Basic"
Did some more testing on my server here and I totally agree, don't need "AuthType Basic".
* Fix PUT api/project/:code/members/:id
Before that commit, every PUT *must* change the name of the members, so that was :
- no idempotence,
- no ability to change only weight
fix#295
* Remove redundant comment
* Use token based auth in invitation e-mails
Invitation e-mails no longer contain the clear
text project password
* Skip invite page after project creation
- Replace ``The project identifier is demo, remember it!``
by ``Invite other people to join this project!``
(linking to the invite page)
- Encourage users to share the project password via other
communication means in the reminder email
* Fixed exposed password in session
The project password was set in clear text
in the session cookie. The cookie payload is
only base64 encoded so it must not be used to
store private information. The password is
simply replaced by a boolean.
* Simplify authentication logic
* Add a command to generate configuration examples
Config files are generated from templates (which remplace previous example files).
- solve the issue of hard-to-explain configuration examples
- ease pkg path seeking (avoid it, actually)
- add working defaults for sqlite and unix socket paths (instead of
/replace/me/path/example)
- move settings comments from default_settings.py to ihatemoney.cfg.j2, as it is
the one that will be facing user.
* Use generate-config command in install doc
Also follow the new working defaults of templates for socket and db path.
* Fix doc settings table
On the long term, plaintext tables might destroy humanity.
* Mention templates dir URL in documentation
As requested by @almet
* Fix RST markup
This was formatted as markdown while this is a .rst
* Mention Issue/PR numbers in ChangeLog
* Rephrase changelog entries to be more succint
And clearer, IMHO.
* Move changes to Changed section.
* Remove redundant entry
Reality-sync with default_settings.py
Not fixing the whole table layout because
- my text editor doesn't do it ;
- I'm too lazy ;
- #251 is IMHO the real way to this issue :)
* Update to a more flexible admin authentication
* Admin can now access any project
* Add delete and edit options in the dashboard
* Add a link to the dashboard in the nav bar
This is a rework of the changes proposed by @Olivd, so they can apply on top of
the latest master without trouble. All credit goes to him for the code.
* Protect admin endpoints against brute force attacks
Add a throttling mechanism to prevent a client brute
forcing the authentication form, based on its ip address
Closes#245
* Reset attempt counters if they get memory hungry
* Fix conf files to reflect module renaming
Python module was renamed budget → ihatemoney (see #243 and 6923367).
Now, "budget" relates to nothing.
* Harmonize `APPLICATION_ROOT` doc with other settings
* Fix link markup
* Switch documentation to recomend pip over git
- Update installation instruction
- Clearly separate dev setup from installation
- Some rewordings/section-ization by the way
* Add a hint on how to find the static path
This is a downside on the pip choice over git for installation.
We will have to ease that a bit. By doc or by code, before next release.
* Make the nginx deployment doc more accurate
* Add a big fat warning about SECRET_KEY in doc
Bootstrap-datepicker is only included in the
list_bills template but its configuration was
living in the layout template, leading to a
javascript error on every page except list_bills.
Fixes#256