Commit graph

641 commits

Author SHA1 Message Date
0livd
efd2b66ac6 Do not import the whole werkzeug pkg (#271) 2017-09-07 11:02:12 +02:00
JocelynDelalande
6ccf86919e Normalize changelog (#265)
* 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
2017-09-06 15:01:44 +02:00
JocelynDelalande
2964b8958c BREAKING CHANGE: Rename supervisor program (#268)
To match `budget` name disparition (package got renamed in #243).

This should be mentioned in upgrade guide.

ref #243 #264
2017-09-06 10:27:04 +02:00
JocelynDelalande
40dda53607 Fix default SQLALCHEMY_DATABASE_URI value in doc (#267)
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 :)
2017-09-06 10:26:48 +02:00
0livd
7a918c9349 Enhance the dashboard. (#262)
* 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.
2017-09-04 15:44:20 +02:00
JocelynDelalande
ee1ecbf3e7 Add doc building instructions (#263) 2017-08-24 17:00:58 +02:00
0livd
2ec4fb589f Add a statistics tab (#257) 2017-08-21 23:51:32 +02:00
0livd
ec4a099f18 Protect admin endpoints against brute force attacks (#249)
* 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
2017-08-20 12:37:12 +02:00
JocelynDelalande
68e4114735 Streamline installation doc, now using pip (#252)
* 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
2017-08-20 12:25:57 +02:00
0livd
a0d4917ac4 Fix misplaced datepicker configuration (#258)
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
2017-08-20 12:22:47 +02:00
0livd
75104d9c19 Add python 3.6 support (#259)
Closes #253
2017-08-20 12:21:59 +02:00
0livd
c7815e4878 Fix #248: Database creation issue (#254)
In flask's development server, the route handlers
run in a different thread than the main thread
thus an in-memory database created in the main thread
cannot be acccessed by the route handlers.
Switching the default database location to a temporary
file solves the isssue.

See full explanation here:
https://gehrcke.de/2015/05/in-memory-sqlite-database-and-flask-a-threading-trap/
2017-08-06 04:06:21 +02:00
0livd
8fd53f827e Revert configuration tests deletion (#250)
Some supernatural power erased the configuration
tests, they're now back !
2017-07-09 22:29:57 +02:00
3a4282fd75 Absolute imports & some other improvements (#243)
* Use absolute imports and rename package to ihatemoney
* Add a ihatemoney command
* Factorize application creation logic
* Refactor the tests
* Update the wsgi.py module with the new create_app() function
* Fix some styling thanks to Flake8.
* Automate Flake8 check in the CI.
2017-07-07 00:06:56 +02:00
0e374cd5e0 Make all imports relative (#229)
* Make all imports relative

* Change the way the application runs in the Makefile

* Import the default settings relatively

* Fix manage.py imports
2017-06-28 21:36:02 +02:00
0livd
603ac10d6e Turn the WSGI file into a python module (#240)
* Turn the WSGI file into a python module

* Update conf files to use the new wsgi module

Apache and gunicorn now use the same entrypoint

* Update Changelog
2017-06-28 00:04:47 +02:00
0livd
2ad4ef5466 Remove unused option in the setup script (#239)
Additionnal files to be distributed along
with the sources are already specified in
the MANIFEST.in file thus the package_data
entry in the setup script can be safely removed
2017-06-27 23:11:52 +02:00
JocelynDelalande
ce90ff0ffd Merge pull request #226 from spiral-project/rename-delete-to-deactivate
Rename delete to deactivate for members. Fixes #177
2017-06-27 19:52:07 +02:00
9adc48b50d Warn user when using default 'not-so-secret' secret-key. 2017-06-27 08:06:38 +02:00
0livd
a836085448 Use a hashed password for ADMIN_PASSWORD (#236)
* Use a hashed password for ADMIN_PASSWORD

A generate_password_hash manage.py command is provided
Fixes #233

* Print a console warning for users using a clear text ADMIN_PASSWORD

* Reword ADMIN_PASSWORD doc

* Update changelog

* Update CHANGELOG.rst

- say it out loud
- bump to 2.0 (that's the logic of semantic versioning while introducing breaking changes)

* Bump to 2.0 (breaking change)

* Update hashed password warning message

* Mention the generate password hash in the Changelog
2017-06-27 00:16:32 +02:00
a585a73d8b Explain better what is a deactivation of a member, per @JocelynDelalande's review 2017-06-26 22:59:22 +02:00
db29648956 Re-organize the documentation (#223)
* Re-organize the documentation

* Fix encoding errors for python 2

* Document the dependencies. Fixes #199

* Add a make update command. Fixes #211
2017-06-21 14:03:16 +02:00
Lucas Verney
93235cfc50 Add meta viewport tag. Fixes #219. (#231) 2017-06-21 14:02:56 +02:00
c0e872f01a Rename delete to deactivate for members. Fixes #177 2017-06-21 02:03:06 +02:00
Jocelyn Delalande
9dd6a6d18f Back to development: 1.1 2017-06-20 23:00:28 +02:00
Jocelyn Delalande
6f5297660e Preparing release 1.0 2017-06-20 22:46:58 +02:00
JocelynDelalande
d803ddce04 Prepare changelog & contrib list for v1.0 (#222) 2017-06-20 22:33:43 +02:00
0livd
d960418dc0 Move the wsgi file to the budget dir (#218)
The wsgi file needs to live in the budget dir
if we want it to be installed by setuptools
2017-06-20 00:44:57 +02:00
0livd
ab68ab149d Update docs requirements to fix failing build (#217)
Closes #216
2017-06-19 00:21:27 +02:00
0livd
d0178ec6b6 Tell Apache to add the budget directory to the python path (#215)
The path no longer needs to be modified in the .wsgi file
2017-06-18 00:00:42 +02:00
Lucas Verney
32f2339c47 More responsive layout (#213)
Fix navbar responsiveness on mobile.
2017-06-11 19:33:22 +02:00
0livd
ea8eda35a7 Public project creation and admin permissions (#210)
* 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
2017-05-18 11:48:09 +02:00
0livd
091553be56 Add ACTIVATE_DEMO_PROJECT setting (#209)
When set to False (True by default), it deactivates
the demo project
2017-05-17 00:21:41 +02:00
4410aaa504 Fix sphinx integration (#208)
* Fix rst link formatting in the README

* Use Sphinx 1.5.5 since 1.6b2 is selected otherwise and breaks.
2017-05-08 22:18:50 +02:00
0livd
50d2689179 Makefile: Add new rule to compile translations (#207) 2017-05-06 00:02:18 +02:00
0livd
e3da3b3b7f Externalize the settings (#193)
Default settings from app's root path are loaded first
Settings are then overriden by /etc/ihatemoney/ihatemoney.cfg
or by another file which path is set in an env var
Fixes #187
2017-04-23 18:32:37 +02:00
0livd
fb84135fe5 Move tests to budget.tests (#205)
* Move tests to budget.tests

Update tox.ini to call the unittest dicovery module
Closes #196

* Fix typo in Readme
2017-04-22 23:07:24 +02:00
Toover
41ede04a59 Fix makefile: Python lookup and virtualenv setup (#201)
* Fix Python lookup in the Makefile

* Improve the Makefile

To make sure calling for "make serve"
works straight away, the dependencies are
automatically prepared. A "make clean" has
been added, to test this feature.
2017-04-15 19:33:34 +02:00
Toover
4ea5158a70 Update the README with additional requirements and information (#202)
Without this information, I really could not understand where to go next.
2017-04-15 19:31:35 +02:00
0livd
cdf903383a Add the possibilty to run ihatemoney via Apache mod_wsgi (#191)
Add the possibilty to run ihatemoney via Apache mod_wsgi

ihatemoney.wsgi is the entry point for mod_wsgi.
A virtualenv can be activated if its path is specified as
an env var in the apache virtual host file
2017-04-10 18:46:39 +02:00
Jocelyn Delalande
deff0f8bc3 Back to development: 0.10 2017-04-04 16:04:41 +02:00
Jocelyn Delalande
788c16c497 Preparing release 0.9 2017-04-04 16:04:11 +02:00
49615acb1d Merge pull request #192 from JocelynDelalande/jd-remove-warnings
Warnings hunt !
2017-03-29 19:52:38 +02:00
Jocelyn Delalande
4799fcb34f Remove unused sphinx option
It was triggering a warning :

> copying static files... WARNING: html_static_path entry u'/home/jocelyn/dev/ihatemoney/docs/_static' does not exist

To my knowledge it was not used, and the _static dir do not even exist. Let me know if I am wrong.
2017-03-29 15:36:04 +02:00
Jocelyn Delalande
95d0c71827 Use propper base64 encoding version for py3
Removes py3-only warning (this alias might be removed in future py3 version):

> DeprecationWarning: encodestring() is a deprecated alias, use encodebytes()
>  ('%s:%s' % (username, password)).encode('utf-8')).decode('utf-8').replace('\n', '')

py2-compatible change.
2017-03-29 15:31:28 +02:00
Jocelyn Delalande
f6236b43ca Remove ExtDeprecationWarning from manage.py
Using new-style flask extensions imports.
grep tells me there were the only flask.ext.* occurences remaining in ihatemoney code.
2017-03-29 15:15:47 +02:00
Jocelyn Delalande
ec75e55416 Remove deprecated wtforms TextField
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
2017-03-29 15:11:40 +02:00
Jocelyn Delalande
2609c4aaa7 Update flask-sqlalchemy to >=2.2
Versions prior to 2.1 trigger a deprecation warning because of the import of
`flask.ext.sqlalchemy._compat` instead of `flask_sqlalchemy`.
2017-03-29 15:09:02 +02:00
Jocelyn Delalande
5a7ae4f5d2 Update flask-wtf to 0.14
Important changes include the new way to disable CSRF for a given form, 0.13
does not support it.
2017-03-29 14:38:16 +02:00
Jocelyn Delalande
c7f4547d5d Use non-deprecated way to disable CSRF for API
See also https://github.com/lepture/flask-wtf/pull/287
2017-03-29 14:32:43 +02:00