Better filestorage handling
Merge branch 'master' of github.com:Kozea/Pynuts
Bugfix/Feature: SQL script to populate database with a user

The example could no be fully tested, as all actions required to be logged in,
and no user creation procedure was implemented.

The tester will have to execute the test manually with the command
$ sqlite3 /tmp/test.db < fixture.sql
after having executed the `executable.py` script

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Feature: the Git document repository is automatically created and inited if needed

The Pynuts.document_repository_path directory is now automatically created
(along with its possible parents) when launching the Pynuts app if
non-existent.
If the directory is created, a bare Git repository is initialized inside.

Note that there are 3 ways to configure the path of the Git repository:
 * associate an absolute path to 'PYNUTS_DOCUMENT_REPOSITORY' in the config
 * associate a relative path to 'PYNUTS_DOCUMENT_REPOSITORY' in the config.
   In this case, the path will be taken relatively to the app instance path
 * do nothing. In this case, the git directory will be created as 'documents.git'
   inside the app instance path.
Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Improvement: namespace clarification bewteen git and dulwich

The Repo object is now imported via the dulwich package, instead of
importing it via .git.py, which then imported it via dulwich.
Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Minor: typo

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Minor: Fix docstrings of Git object

Parameters described in docstrings did not match actual Git
__init__ parameters.
Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Minor stuff: comments, typos, etc

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Bugfix: all tests play along with automatic initialisation of Git bare repo

All tests failed because of the new feature introduced in commit 6928722:
automatic Git document repository initialisation.

nosetests can alse be called from any directory.
Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
No need of manual specification of Git repo location

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Ignore test/dump/instance directory

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Same Pylintrc than Radicale

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Pylint compliance

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Merge branch 'documentation' of github.com:Kozea/Pynuts into documentation
More pylint warnings/errors fixed.

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Pylint: Disable W0613 & R0201 in test_complete

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
New validator: is file upload authorized?

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
New feature: File input/type-validators

A system of uploaded file validation is now in place, via the
pynuts.field.UploadField class.
This class inherits from the WTForms FieldField, and is given
an extra ``upload_set`` argument, defining the storage logic
specific to this field.

Example: only allow images, documents, etc

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
Feature: validator MaxSize limit uploaded files size

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>
New dependency: Flask-Uploads

Signed-off-by: Balthazar Rouberol <balthazar.rouberol@kozea.fr>