Commit graph

430 commits

Author SHA1 Message Date
0livd
d8107d449d Add delete and edit project actions in the dashboard
The dashboard is deactivated by default and
is only accessible by admins when activated
A new ACTIVATE_DASHBOARD setting is introduced
2017-06-29 22:54:19 +02:00
0livd
62dd103b30 Admin can access every projects 2017-06-29 18:05:15 +02:00
0livd
d9ae72f4f3 Update to a more flexible admin authentication
We do not rely on the ADMIN_PASSWORD being defined
or not to ask for admin permissions.
Instead we now have a flexible admin auth that can
be conditionnaly bypassed
2017-06-29 17:59:41 +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
Jocelyn Delalande
7380b6f9f7 Explicitly disables SQLALCHEMY_TRACK_MODIFICATIONS
That noisy warning was everywhere in our test/CI logs before that commit:

> ./home/travis/build/spiral-project/ihatemoney/.tox/py27/lib/python2.7/site-packages/flask_sqlalchemy/__init__.py:839: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
>
>  'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhe
2017-03-29 12:11:24 +02:00
JocelynDelalande
bf2c11f8a9 Merge pull request #190 from spiral-project/use-app-root
Use app.root_path instead of __HERE__
2017-03-29 11:47:12 +02:00
ce5ceb7f10 Merge pull request #189 from JocelynDelalande/py34
Add Python 3.4 support
2017-03-29 11:43:57 +02:00
Jocelyn Delalande
dfe8297fae Add Python 3.4 support
Note that py3.4 is the version shipped in current Debian version (Jessie).
2017-03-29 11:21:39 +02:00
f43b3dc41d Use app.root_path instead of __HERE__ 2017-03-29 00:07:53 +02:00
1b94f6738a Merge pull request #186 from spiral-project/tox
Tox support
2017-03-29 00:03:25 +02:00
aaf9f9f237 @JocelynDelalande's review 2017-03-28 20:25:23 +02:00
9a1708ecf6 Merge pull request #188 from JocelynDelalande/travis-tox
Make travis use tox
2017-03-28 20:23:50 +02:00
Jocelyn Delalande
9e30f3bb99 Make travis use tox
So that we are consistent between dev test env and CI test env.
The use of `TOXENV` is to keep travis running the several envs in parallel.
2017-03-28 20:13:49 +02:00
42c9af528f Add tox support. 2017-03-28 17:50:11 +02:00
08a4935566 Update the README with makefile changes 2017-03-28 17:49:22 +02:00