Move transaction.py to snf_django package
Move intdecimalfield.py to snf_django package
Rename it to fields.py and update all migrations that reference the field.
Move managers.py to snf_django package
Merge branch 'develop' into feature-quotas
Conflicts: snf-astakos-app/astakos/im/api/service.py snf-quotaholder-app/quotaholder_django/quotaholder_app/callpoint.py
Use 'python-objpool' instead of 'synnefo.lib.pool'
Use the python-objpool package for pooling resources as object, insteadof the pooling code that existed in snf-common ('synnefo.lib.pool')
Refs #3524
wip Restructure astakos views
Replace custom transaction context with:
- decorator `commit_on_success_strict', which uses transaction.commit_manually and ensures that the transaction rolls back on any exception
- context ExceptionHandler, which logs and...
Return EmptyQuerySet on an EmptyResultSet
Refs #3489
Call to as_sql() raises EmptyResultSet in a couple of occasions,more importantly when filtering based on an empty list: filter(field__in=[]).
Move managers.py in synnefo.lib.db
This makes it easier to maintain, since it is used in multiple applications(astakos.im and quotaholder_app).
pep8 fixes and copyright notice
Simplify handler's call
Rollback, even if transaction is not dirty
This is a temporary bug fix forhttps://code.djangoproject.com/ticket/9964 .Django prior to 1.3 does not set a transactiondirty when the DB throws an exception, and thusdoes not trigger rollback, resulting in a...
Do not postprocess if it's marked for rollback
Run postprocess in a transaction context too
Cleanup transaction context
Remove a debugging print
Custom transaction context
A context which can be used as a decorator;it commits the transaction if no exception was raised andthe rollback flag was not checked.Executes customizable code after committing.
Additional parameters in the field constructor
Redefine IntDecimalField to allow support for south migration;apply the new field to astakos.im.ProjectResourceGrant
Fix cleanup of DB pooled connections
Fix bug in cleanup of DB pooled connections before putting them back tothe pool. The way the connection was cleaned, resulted in mishandling ofthe transactions.
Accoring to psycopg2 docs, in case of a READ COMMITED isolation level:...
Enhange logging in db and http pools
port pooled psycopg2 to new pool api
Move pooling psycopg2 wrapper to synnefo.lib.db
Move pooling psycopg2 wrapper to synnefo.lib.db,please see commit e83ed1fb8fb4d0d19c2d3f86152fde60b3cadfd9 for all thedetails on how to use the pooling wrapper for psycopg2.