% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[a4paper,12pt,english]{sphinxmanual}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter{00A0}{\nobreakspace}
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{babel}
\usepackage{mathpazo}
\usepackage[Bjarne]{fncychap}
\usepackage{longtable}
\usepackage{sphinx}
\usepackage{multirow}

\addto\captionsenglish{\renewcommand{\figurename}{Fig. }}
\addto\captionsenglish{\renewcommand{\tablename}{Table }}
\floatname{literal-block}{Listing }

\usepackage{flaskstyle}

\title{Abilian Core Documentation}
\date{2015-05-27}
\release{0.1}
\author{Stefane Fermigier}
\newcommand{\sphinxlogo}{}
\renewcommand{\releasename}{Release}
\makeindex

\makeatletter
\def\PYG@reset{\let\PYG@it=\relax \let\PYG@bf=\relax%
    \let\PYG@ul=\relax \let\PYG@tc=\relax%
    \let\PYG@bc=\relax \let\PYG@ff=\relax}
\def\PYG@tok#1{\csname PYG@tok@#1\endcsname}
\def\PYG@toks#1+{\ifx\relax#1\empty\else%
    \PYG@tok{#1}\expandafter\PYG@toks\fi}
\def\PYG@do#1{\PYG@bc{\PYG@tc{\PYG@ul{%
    \PYG@it{\PYG@bf{\PYG@ff{#1}}}}}}}
\def\PYG#1#2{\PYG@reset\PYG@toks#1+\relax+\PYG@do{#2}}

\expandafter\def\csname PYG@tok@gd\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.63,0.00,0.00}{##1}}}
\expandafter\def\csname PYG@tok@gu\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.50,0.00,0.50}{##1}}}
\expandafter\def\csname PYG@tok@gt\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.27,0.87}{##1}}}
\expandafter\def\csname PYG@tok@gs\endcsname{\let\PYG@bf=\textbf}
\expandafter\def\csname PYG@tok@gr\endcsname{\def\PYG@tc##1{\textcolor[rgb]{1.00,0.00,0.00}{##1}}}
\expandafter\def\csname PYG@tok@cm\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
\expandafter\def\csname PYG@tok@vg\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
\expandafter\def\csname PYG@tok@m\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\expandafter\def\csname PYG@tok@mh\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\expandafter\def\csname PYG@tok@cs\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}\def\PYG@bc##1{\setlength{\fboxsep}{0pt}\colorbox[rgb]{1.00,0.94,0.94}{\strut ##1}}}
\expandafter\def\csname PYG@tok@ge\endcsname{\let\PYG@it=\textit}
\expandafter\def\csname PYG@tok@vc\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
\expandafter\def\csname PYG@tok@il\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\expandafter\def\csname PYG@tok@go\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.20,0.20,0.20}{##1}}}
\expandafter\def\csname PYG@tok@cp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@gi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.63,0.00}{##1}}}
\expandafter\def\csname PYG@tok@gh\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.00,0.50}{##1}}}
\expandafter\def\csname PYG@tok@ni\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.84,0.33,0.22}{##1}}}
\expandafter\def\csname PYG@tok@nl\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.13,0.44}{##1}}}
\expandafter\def\csname PYG@tok@nn\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}
\expandafter\def\csname PYG@tok@no\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.38,0.68,0.84}{##1}}}
\expandafter\def\csname PYG@tok@na\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\expandafter\def\csname PYG@tok@nb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@nc\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.05,0.52,0.71}{##1}}}
\expandafter\def\csname PYG@tok@nd\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.33,0.33,0.33}{##1}}}
\expandafter\def\csname PYG@tok@ne\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@nf\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.49}{##1}}}
\expandafter\def\csname PYG@tok@si\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.44,0.63,0.82}{##1}}}
\expandafter\def\csname PYG@tok@s2\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\expandafter\def\csname PYG@tok@vi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
\expandafter\def\csname PYG@tok@nt\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.02,0.16,0.45}{##1}}}
\expandafter\def\csname PYG@tok@nv\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.38,0.84}{##1}}}
\expandafter\def\csname PYG@tok@s1\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\expandafter\def\csname PYG@tok@gp\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}
\expandafter\def\csname PYG@tok@sh\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\expandafter\def\csname PYG@tok@ow\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@sx\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.78,0.36,0.04}{##1}}}
\expandafter\def\csname PYG@tok@bp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@c1\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
\expandafter\def\csname PYG@tok@kc\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@c\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.50,0.56}{##1}}}
\expandafter\def\csname PYG@tok@mf\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\expandafter\def\csname PYG@tok@err\endcsname{\def\PYG@bc##1{\setlength{\fboxsep}{0pt}\fcolorbox[rgb]{1.00,0.00,0.00}{1,1,1}{\strut ##1}}}
\expandafter\def\csname PYG@tok@mb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\expandafter\def\csname PYG@tok@ss\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.32,0.47,0.09}{##1}}}
\expandafter\def\csname PYG@tok@sr\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.14,0.33,0.53}{##1}}}
\expandafter\def\csname PYG@tok@mo\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\expandafter\def\csname PYG@tok@kd\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@mi\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.13,0.50,0.31}{##1}}}
\expandafter\def\csname PYG@tok@kn\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@o\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.40,0.40,0.40}{##1}}}
\expandafter\def\csname PYG@tok@kr\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@s\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\expandafter\def\csname PYG@tok@kp\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@w\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.73,0.73,0.73}{##1}}}
\expandafter\def\csname PYG@tok@kt\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.56,0.13,0.00}{##1}}}
\expandafter\def\csname PYG@tok@sc\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\expandafter\def\csname PYG@tok@sb\endcsname{\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\expandafter\def\csname PYG@tok@k\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.00,0.44,0.13}{##1}}}
\expandafter\def\csname PYG@tok@se\endcsname{\let\PYG@bf=\textbf\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}
\expandafter\def\csname PYG@tok@sd\endcsname{\let\PYG@it=\textit\def\PYG@tc##1{\textcolor[rgb]{0.25,0.44,0.63}{##1}}}

\def\PYGZbs{\char`\\}
\def\PYGZus{\char`\_}
\def\PYGZob{\char`\{}
\def\PYGZcb{\char`\}}
\def\PYGZca{\char`\^}
\def\PYGZam{\char`\&}
\def\PYGZlt{\char`\<}
\def\PYGZgt{\char`\>}
\def\PYGZsh{\char`\#}
\def\PYGZpc{\char`\%}
\def\PYGZdl{\char`\$}
\def\PYGZhy{\char`\-}
\def\PYGZsq{\char`\'}
\def\PYGZdq{\char`\"}
\def\PYGZti{\char`\~}
% for compatibility with earlier versions
\def\PYGZat{@}
\def\PYGZlb{[}
\def\PYGZrb{]}
\makeatother

\renewcommand\PYGZsq{\textquotesingle}

\begin{document}

\maketitle
\tableofcontents
\phantomsection\label{index::doc}


\includegraphics{abilian-logo-baseline.png}

Welcome to Abilian Core's documentation.

Abilian Core is an enterprise application development platform based on the \href{http://flask.pocoo.org/}{Flask micro-framework}, the \href{http://www.sqlalchemy.org/}{SQLAlchemy ORM}, good intentions and best practices (for some value of ``best'').

The full documentation is available on \href{http://docs.abilian.com/}{http://docs.abilian.com/}.

It builds on powerful and well documented Python librairies, mainly:
\begin{itemize}
\item {} 
\href{http://flask.pocoo.org/}{Flask}

\item {} 
\href{http://www.sqlalchemy.org/}{SQLAlchemy}

\item {} 
\href{http://wtforms.simplecodes.com/}{WTForms}

\end{itemize}

This documentation will assume that a developer already has some knowledge of
these librairies.


\part{Contents}
\label{index:contents}\label{index:welcome-to-the-abilian-core-documentation}

\chapter{About Abilian Core}
\label{introduction:about-abilian-core}\label{introduction::doc}
Abilian Core is an enterprise application development platform based on the \href{http://flask.pocoo.org/}{Flask micro-framework}, the \href{http://www.sqlalchemy.org/}{SQLAlchemy ORM}, good intentions and best practices (for some value of ``best'').

The full documentation is available on \href{http://docs.abilian.com/}{http://docs.abilian.com/}.


\section{Goals \& principles}
\label{introduction:goals-principles}\begin{itemize}
\item {} 
Development must be easy and fun (some some definition of ``easy'' and ``fun'', of course)

\item {} 
The less code (and configuration) we write, the better

\item {} 
Leverage existing reputable open source libraries and frameworks, such as SQLAlchemy and Flask

\item {} 
It must lower errors, bugs, project's time to deliver. It's intended to be a rapid application development tool

\item {} 
It must promote best practices in software development, specially Test-Driven Development (as advocated by the \href{http://www.amazon.com/gp/product/0321503627/ref=as\_li\_qf\_sp\_asin\_tl?ie=UTF8\&camp=1789\&creative=9325\&creativeASIN=0321503627\&linkCode=as2\&tag=fermigiercom-20}{GOOS book})

\end{itemize}


\section{Features}
\label{introduction:features}
Here's a short list of features that you may find appealing in Abilian:


\subsection{Infrastructure}
\label{introduction:infrastructure}\begin{itemize}
\item {} 
Plugin framework

\item {} 
Asynchronous tasks (using \href{http://www.celeryproject.org/}{Celery})

\item {} 
Security model and service

\end{itemize}


\subsection{Domain model and services}
\label{introduction:domain-model-and-services}\begin{itemize}
\item {} 
Domain object model, based on SQLAlchemy

\item {} 
Audit

\end{itemize}


\subsection{Content management and services}
\label{introduction:content-management-and-services}\begin{itemize}
\item {} 
Indexing service

\item {} 
Document preview and transformation

\end{itemize}


\subsection{Social}
\label{introduction:social}\begin{itemize}
\item {} 
Users, groups and social graph (followers)

\item {} 
Activity streams

\end{itemize}


\subsection{User Interface and API}
\label{introduction:user-interface-and-api}\begin{itemize}
\item {} 
Forms (based on \href{http://wtforms.simplecodes.com/}{WTForms})

\item {} 
CRUD (Create, Retrieve, Edit/Update, Remove) interface from domain
models

\item {} 
Labels and descriptions for each field

\item {} 
Various web utilities: view decorators, class-based views, Jinja2
filters, etc.

\item {} 
A default UI based on \href{http://getbootstrap.com/}{Bootstrap 3} and
several carefully selected jQuery plugins such as
\href{http://ivaynberg.github.io/select2/}{Select2}

\item {} 
REST and AJAX API helpers

\item {} 
i8n: support for multi-language via Babel, with multiple translation
dictionaries

\end{itemize}


\subsection{Management and admin}
\label{introduction:management-and-admin}\begin{itemize}
\item {} 
Initial settings wizard

\item {} 
Admin and user settings framework

\item {} 
System monitoring (using \href{https://getsentry.com/welcome/}{Sentry})

\end{itemize}


\section{Current status}
\label{introduction:current-status}
Abilian Core is currently alpha (or even pre-alpha) software, in terms
of API stability.

It is currently used in several applications that have been developped
by \href{http://www.abilian.com/}{Abilian} over the last two years:
\begin{itemize}
\item {} 
Abilian SBE (Social Business Engine) - an enterprise 2.0 (social
collaboration) platform

\item {} 
Abilian EMS (Event Management System)

\item {} 
Abilian CRM (Customer / Contact / Community Relationship Management
System)

\item {} 
Abilian Le MOOC - a MOOC prototype

\item {} 
Abilian CMS - a Web CMS

\end{itemize}

In other words, Abilian Core is the foundation for a small, but growing,
family of business-critical applications that our customers intend us to
support in the coming years.

So while Abilian Core APIs, object model and even architecture, may (and
most probably will) change due to various refactorings that are expected
as we can't be expected to ship perfect software on the firt release, we
also intend to treat it as a valuable business asset and keep
maintaining and improving it in the foreseeable future.


\section{Roadmap \& getting involved}
\label{introduction:roadmap-getting-involved}
We have a \href{https://www.pivotaltracker.com/s/projects/878951}{roadmap on Pivotal
Tracker} that we use
internally to manage our iterative delivery process.

For features and bug requests (or is it the other way around?), we
recommend that you use the \href{https://github.com/abilian/abilian-core/issues}{GitHub issue
tracker}.


\section{Licence}
\label{introduction:licence}
Abilian Core is licensed under the LGPL.


\section{Credits}
\label{introduction:credits}
Abilian Core has been created by the development team at Abilian
(currently: Stefane and Bertrand), with financial support from our
wonderful customers, and R\&D fundings from the French Government, the
Paris Region and the European Union.

We are also specially grateful to:
\begin{itemize}
\item {} 
\href{http://lucumr.pocoo.org/}{Armin Ronacher} for his work on Flask.

\item {} 
\href{http://techspot.zzzeek.org/}{Michael Bayer} for his work on
SQLAlchemy.

\item {} 
Everyone who has been involved with and produced open source software
for the Flask ecosystem (Kiran Jonnalagadda and the
\href{https://hasgeek.com/}{HasGeek} team, Max Countryman, Matt Wright,
Matt Good, Thomas Johansson, James Crasta, and probably many others).

\item {} 
The creators of Django, Pylons, TurboGears, Pyramid and Zope, for
even more inspiration.

\item {} 
The whole Python community.

\end{itemize}


\chapter{Installing Abilian Core}
\label{installing:installing-abilian-core}\label{installing::doc}
If you are a Python web developer (which is the primary target for this
project), you probably already know about:
\begin{itemize}
\item {} 
Python 2.7

\item {} 
Virtualenv

\item {} 
Pip

\end{itemize}

So, after you have created and activated a virtualenv for the project,
just run:

\begin{Verbatim}[commandchars=\\\{\}]
pip install \PYGZhy{}r requirements.txt
\end{Verbatim}

To use some features of the library, namely document and images
transformation, you will need to install the additional native packages,
using our operating system's package management tools (\code{dpkg},
\code{yum}, \code{brew}...):
\begin{itemize}
\item {} 
A few image manipulation libraries (\code{libpng}, \code{libjpeg})

\item {} 
The \code{poppler-utils}, \code{unoconv}, \code{LibreOffice}, \code{ImageMagick}
utilities

\item {} 
\href{http://lesscss.org/}{lesscss}:

For Debian/Ubuntu the package is named \emph{node-less}. If your distribution's
package is too old, you may install \href{http://nodejs.org/}{node-js} \textgreater{}= 0.10 and
\href{https://www.npmjs.org/}{npm}. Lesscss can then be installed with:

\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n+nv}{\PYGZdl{} }sudo npm install \PYGZhy{}g less
npm http GET https://registry.npmjs.org/less
npm http \PYG{l+m}{200} https://registry.npmjs.org/less
...
\PYG{n+nv}{\PYGZdl{} }which lessc
/usr/bin/lessc
\end{Verbatim}

\end{itemize}


\section{Testing}
\label{installing:testing}
Abilian Core come with a full unit and integration testing suite. You
can run it with \code{make test} (once your virtualenv has been activated).

Alternatively, you can use \code{tox} to run the full test suite in an
isolated environment.


\chapter{Constributing to Abilian Core}
\label{contributing:constributing-to-abilian-core}\label{contributing::doc}

\section{Project on GitHub}
\label{contributing:project-on-github}
The project is hosted on GitHub at: \href{https://github.com/abilian/abilian-core}{https://github.com/abilian/abilian-core}.

Participation in the development of Abilian is welcome and encouraged, through
the various mechanisms provided by GitHub:
\begin{itemize}
\item {} 
\href{https://github.com/abilian/abilian-core/issues}{Bug reports and feature requests}.

\item {} 
\href{https://github.com/abilian/abilian-core/pulls}{Forks and pull requests}.

\end{itemize}


\section{License and copyright}
\label{contributing:license-and-copyright}
The Abilian code is copyrighted by Abilian SAS, a french company.

It is licenced under the LGPL (Lesser General Public License), which means
you can reuse the product as a library

If you contribute to Abilian, we ask you to transfer your rights to your
contribution to us.

In case you have questions, you're welcome to contact us.


\section{Build Status}
\label{contributing:build-status}
We give a great deal of care to the quality of our software, and try to use
all the tools that are at our disposal to make it rock-solid.

This includes:
\begin{itemize}
\item {} 
Having an exhaustive test suite.

\item {} 
Using continuous integration (CI) servers to run the test suite on every commit.

\item {} 
Running tests.

\item {} 
Using our products daily.

\end{itemize}

You can check the build status:
\begin{itemize}
\item {} 
\href{http://jenkins.abilian.com/job/Abilian-Core/}{Our own Jenkins server}

\item {} 
\href{https://drone.io/github.com/abilian/abilian-core/latest}{On drone.io}

\item {} 
\href{https://travis-ci.org/abilian/abilian-core}{On Travis CI}

\end{itemize}

You can also check the coverage reports:
\begin{itemize}
\item {} 
\href{https://coveralls.io/r/abilian/abilian-core?branch=master}{On coveralls.io}

\end{itemize}


\section{Releasing}
\label{contributing:releasing}
We've switched to PBR (\textless{}\href{http://docs.openstack.org/developer/pbr/}{http://docs.openstack.org/developer/pbr/}\textgreater{}) recently
to manage our project metadata.

It comes with some conventions on its own when it comes to releasing.

Here's what you should do to make a new release on PyPI:
\begin{enumerate}
\item {} 
Check that the CHANGES.rst file is correct.

\item {} 
Commit.

\end{enumerate}

3. Tag, using the \emph{-s} option (ex: \emph{tag -s 0.3.0}), using numbers that are
consistent with semantic versionning. Note that you will need to sign the
tag with your GPG key.
\begin{enumerate}
\setcounter{enumi}{3}
\item {} 
Run \emph{python setup.py sdist upload}.

\end{enumerate}


\chapter{Coding standard}
\label{coding-standard:coding-standard}\label{coding-standard::doc}
We recommend using the PEP8 and Google coding standard, with the following exceptions:
\begin{itemize}
\item {} 
Indentation should be 2 chars, not 4.

\end{itemize}


\section{Additional rules}
\label{coding-standard:additional-rules}
TODO


\section{Notes}
\label{coding-standard:notes}

\subsection{Line length}
\label{coding-standard:line-length}
We stick to the ``no lines longer than 80 characters'' rule despite the fact that
we're living in a post VT-220 world.

Here's \href{http://www.reddit.com/r/programming/comments/2nkntp/does\_column\_width\_80\_make\_sense\_in\_2014/cmf3f9s}{some rationale} by user ``badsector'' on Reddit:
\begin{quote}

I used to use a 120 character limit or ignore E501 on my pep8 checker (python), but eventually went back to the default 80 character limit. I realized it did more for me than let me fit 4 files side by side on a laptop screen:
\begin{itemize}
\item {} 
It discouraged me from writing long sprawling if statements and method chains.

\item {} 
With less space, I thought more assigning about clear and concise names for things.

\item {} 
I would break out deeply nested ifs and other control statements into separate functions. This is probably the biggest win since smaller code pieces are easier to unit test due to lowered cyclomatic complexity.

\end{itemize}
\end{quote}


\chapter{API}
\label{api:api}\label{api::doc}

\section{Package \texttt{abilian}}
\label{api:package-abilian}

\subsection{Module \texttt{abilian.app}}
\label{api:module-abilian-app}

\subsection{Module \texttt{abilian.i18n}}
\label{api:module-abilian-i18n}

\section{Package \texttt{abilian.plugin}}
\label{api:module-abilian.plugin}\label{api:package-abilian-plugin}\index{abilian.plugin (module)}
Starting work on a plugin system. This will probably be refactored heavily
in the future.


\section{Package \texttt{abilian.core}}
\label{api:package-abilian-core}

\subsection{Module \texttt{abilian.core.commands}}
\label{api:module-abilian-core-commands}

\subsection{Module \texttt{abilian.core.entities}}
\label{api:module-abilian-core-entities}

\subsection{Module \texttt{abilian.core.extensions}}
\label{api:module-abilian-core-extensions}

\subsection{Module \texttt{abilian.core.logging}}
\label{api:module-abilian-core-logging}\label{api:module-abilian.core.logging}\index{abilian.core.logging (module)}

\subsubsection{Special loggers}
\label{api:special-loggers}
Changing \emph{patch\_logger} logging level must be done very early, because it may
emit logging during imports. Ideally, it's should be the very first action in
your entry point before anything has been imported:

\begin{Verbatim}[commandchars=\\\{\}]
\PYG{k+kn}{import} \PYG{n+nn}{logging}
\PYG{n}{logging}\PYG{o}{.}\PYG{n}{getLogger}\PYG{p}{(}\PYG{l+s}{\PYGZsq{}}\PYG{l+s}{PATCH}\PYG{l+s}{\PYGZsq{}}\PYG{p}{)}\PYG{o}{.}\PYG{n}{setLevel}\PYG{p}{(}\PYG{n}{logging}\PYG{o}{.}\PYG{n}{INFO}\PYG{p}{)}
\end{Verbatim}
\index{patch\_logger (in module abilian.core.logging)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.logging.patch_logger}\pysigline{\bfcode{patch\_logger}\strong{ = \textless{}abilian.core.logging.PatchLoggerAdapter object\textgreater{}}}
logger for monkey patchs. use like this:
patch\_logger.info(\textless{}func\textgreater{}{}`patched\_func{}`)

\end{fulllineitems}



\subsection{Module \texttt{abilian.core.signals}}
\label{api:module-abilian-core-signals}\label{api:module-abilian.core.signals}\index{abilian.core.signals (module)}
All signals used by Abilian Core.

Signals are the main tools used for decoupling applications components by
sending notifications. In short, signals allow certain senders to notify
subscribers that something happened.

Cf. \href{http://flask.pocoo.org/docs/signals/}{http://flask.pocoo.org/docs/signals/} for detailed documentation.

The main signal is currently {\hyperref[api:abilian.core.signals.activity]{\emph{\code{activity}}}}.
\index{activity (in module abilian.core.signals)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.signals.activity}\pysigline{\bfcode{activity}\strong{ = \textless{}blinker.base.NamedSignal object at 0x1078d6f10; `activity'\textgreater{}}}
This signal is used by the activity streams service and its clients.

\end{fulllineitems}

\index{components\_registered (in module abilian.core.signals)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.signals.components_registered}\pysigline{\bfcode{components\_registered}\strong{ = \textless{}blinker.base.NamedSignal object at 0x1078d6e90; `app:components:registered'\textgreater{}}}
Triggered at application initialization when all extensions and plugins have
been loaded

\end{fulllineitems}

\index{entity\_created (in module abilian.core.signals)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.signals.entity_created}\pysigline{\bfcode{entity\_created}\strong{ = \textless{}blinker.base.NamedSignal object at 0x1078d6f90; `entity:created'\textgreater{}}}
Currently not used and subject to change.

\end{fulllineitems}

\index{entity\_deleted (in module abilian.core.signals)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.signals.entity_deleted}\pysigline{\bfcode{entity\_deleted}\strong{ = \textless{}blinker.base.NamedSignal object at 0x1078e4050; `entity:deleted'\textgreater{}}}
Currently not used and subject to change.

\end{fulllineitems}

\index{entity\_updated (in module abilian.core.signals)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.signals.entity_updated}\pysigline{\bfcode{entity\_updated}\strong{ = \textless{}blinker.base.NamedSignal object at 0x1078d6fd0; `entity:updated'\textgreater{}}}
Currently not used and subject to change.

\end{fulllineitems}

\index{register\_js\_api (in module abilian.core.signals)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.signals.register_js_api}\pysigline{\bfcode{register\_js\_api}\strong{ = \textless{}blinker.base.NamedSignal object at 0x1078d6ed0; `app:register-js-api'\textgreater{}}}
Trigger when JS api must be registered. At this time \href{http://flask.pocoo.org/docs/api/\#flask.url\_for}{\code{flask.url\_for()}} is
usable

\end{fulllineitems}

\index{user\_loaded (in module abilian.core.signals)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.signals.user_loaded}\pysigline{\bfcode{user\_loaded}\strong{ = \textless{}blinker.base.NamedSignal object at 0x1078d6f50; `user\_loaded'\textgreater{}}}
This signal is sent when user object has been loaded. g.user and current\_user
are available.

\end{fulllineitems}



\subsection{Module \texttt{abilian.core.sqlalchemy}}
\label{api:module-abilian.core.sqlalchemy}\label{api:module-abilian-core-sqlalchemy}\index{abilian.core.sqlalchemy (module)}
Additional data types for sqlalchemy
\index{AbilianBaseSAExtension (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.AbilianBaseSAExtension}\pysiglinewithargsret{\strong{class }\bfcode{AbilianBaseSAExtension}}{\emph{app=None}, \emph{use\_native\_unicode=True}, \emph{session\_options=None}}{}
Base subclass of \code{flask.ext.sqlalchemy.SQLAlchemy}. Add
our custom driver hacks.
\index{apply\_driver\_hacks() (AbilianBaseSAExtension method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.AbilianBaseSAExtension.apply_driver_hacks}\pysiglinewithargsret{\bfcode{apply\_driver\_hacks}}{\emph{app}, \emph{info}, \emph{options}}{}
\end{fulllineitems}


\end{fulllineitems}

\index{JSON (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSON}\pysiglinewithargsret{\strong{class }\bfcode{JSON}}{\emph{*args}, \emph{**kwargs}}{}
Stores any structure serializable with json.
\begin{description}
\item[{Usage::}] \leavevmode
JSON()
Takes same parameters as sqlalchemy.types.Text

\end{description}
\index{impl (JSON attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSON.impl}\pysigline{\bfcode{impl}}
alias of \code{Text}

\end{fulllineitems}

\index{process\_bind\_param() (JSON method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSON.process_bind_param}\pysiglinewithargsret{\bfcode{process\_bind\_param}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}

\index{process\_result\_value() (JSON method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSON.process_result_value}\pysiglinewithargsret{\bfcode{process\_result\_value}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}


\end{fulllineitems}

\index{JSONUniqueListType (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSONUniqueListType}\pysiglinewithargsret{\strong{class }\bfcode{JSONUniqueListType}}{\emph{*args}, \emph{**kwargs}}{}
Store a list in JSON format, with items made unique and sorted.
\index{process\_bind\_param() (JSONUniqueListType method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSONUniqueListType.process_bind_param}\pysiglinewithargsret{\bfcode{process\_bind\_param}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}

\index{python\_type (JSONUniqueListType attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSONUniqueListType.python_type}\pysigline{\bfcode{python\_type}}
\end{fulllineitems}


\end{fulllineitems}

\index{Locale (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Locale}\pysiglinewithargsret{\strong{class }\bfcode{Locale}}{\emph{*args}, \emph{**kwargs}}{}
Store a \code{babel.Locale} instance
\index{impl (Locale attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Locale.impl}\pysigline{\bfcode{impl}}
alias of \code{UnicodeText}

\end{fulllineitems}

\index{process\_bind\_param() (Locale method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Locale.process_bind_param}\pysiglinewithargsret{\bfcode{process\_bind\_param}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}

\index{process\_result\_value() (Locale method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Locale.process_result_value}\pysiglinewithargsret{\bfcode{process\_result\_value}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}

\index{python\_type (Locale attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Locale.python_type}\pysigline{\bfcode{python\_type}}
\end{fulllineitems}


\end{fulllineitems}

\index{MutationDict (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationDict}\pysigline{\strong{class }\bfcode{MutationDict}}
Provides a dictionary type with mutability support.
\index{clear() (MutationDict method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationDict.clear}\pysiglinewithargsret{\bfcode{clear}}{}{}
\end{fulllineitems}

\index{coerce() (abilian.core.sqlalchemy.MutationDict class method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationDict.coerce}\pysiglinewithargsret{\strong{classmethod }\bfcode{coerce}}{\emph{key}, \emph{value}}{}
Convert plain dictionaries to MutationDict.

\end{fulllineitems}

\index{pop() (MutationDict method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationDict.pop}\pysiglinewithargsret{\bfcode{pop}}{\emph{key}, \emph{*args}}{}
\end{fulllineitems}

\index{popitem() (MutationDict method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationDict.popitem}\pysiglinewithargsret{\bfcode{popitem}}{}{}
\end{fulllineitems}

\index{setdefault() (MutationDict method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationDict.setdefault}\pysiglinewithargsret{\bfcode{setdefault}}{\emph{key}, \emph{failobj=None}}{}
\end{fulllineitems}

\index{update() (MutationDict method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationDict.update}\pysiglinewithargsret{\bfcode{update}}{\emph{other}}{}
\end{fulllineitems}


\end{fulllineitems}

\index{MutationList (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList}\pysigline{\strong{class }\bfcode{MutationList}}
Provides a list type with mutability support.
\index{append() (MutationList method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList.append}\pysiglinewithargsret{\bfcode{append}}{\emph{item}}{}
\end{fulllineitems}

\index{coerce() (abilian.core.sqlalchemy.MutationList class method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList.coerce}\pysiglinewithargsret{\strong{classmethod }\bfcode{coerce}}{\emph{key}, \emph{value}}{}
Convert list to MutationList.

\end{fulllineitems}

\index{extend() (MutationList method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList.extend}\pysiglinewithargsret{\bfcode{extend}}{\emph{other}}{}
\end{fulllineitems}

\index{insert() (MutationList method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList.insert}\pysiglinewithargsret{\bfcode{insert}}{\emph{idx}, \emph{value}}{}
\end{fulllineitems}

\index{pop() (MutationList method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList.pop}\pysiglinewithargsret{\bfcode{pop}}{\emph{i=-1}}{}
\end{fulllineitems}

\index{remove() (MutationList method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList.remove}\pysiglinewithargsret{\bfcode{remove}}{\emph{item}}{}
\end{fulllineitems}

\index{reverse() (MutationList method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList.reverse}\pysiglinewithargsret{\bfcode{reverse}}{}{}
\end{fulllineitems}

\index{sort() (MutationList method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.MutationList.sort}\pysiglinewithargsret{\bfcode{sort}}{\emph{*args}, \emph{**kwargs}}{}
\end{fulllineitems}


\end{fulllineitems}

\index{SQLAlchemy (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.SQLAlchemy}\pysiglinewithargsret{\strong{class }\bfcode{SQLAlchemy}}{\emph{app=None}, \emph{use\_native\_unicode=True}, \emph{session\_options=None}}{}~\index{create\_scoped\_session() (SQLAlchemy method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.SQLAlchemy.create_scoped_session}\pysiglinewithargsret{\bfcode{create\_scoped\_session}}{\emph{options=None}}{}
Helper factory method that creates a scoped session.

\end{fulllineitems}


\end{fulllineitems}

\index{SignallingSession (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.SignallingSession}\pysiglinewithargsret{\strong{class }\bfcode{SignallingSession}}{\emph{db}, \emph{autocommit=False}, \emph{autoflush=True}, \emph{**options}}{}
\end{fulllineitems}

\index{Timezone (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Timezone}\pysiglinewithargsret{\strong{class }\bfcode{Timezone}}{\emph{*args}, \emph{**kwargs}}{}
Store a \code{pytz.tzfile.DstTzInfo} instance
\index{impl (Timezone attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Timezone.impl}\pysigline{\bfcode{impl}}
alias of \code{UnicodeText}

\end{fulllineitems}

\index{process\_bind\_param() (Timezone method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Timezone.process_bind_param}\pysiglinewithargsret{\bfcode{process\_bind\_param}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}

\index{process\_result\_value() (Timezone method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Timezone.process_result_value}\pysiglinewithargsret{\bfcode{process\_result\_value}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}

\index{python\_type (Timezone attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.Timezone.python_type}\pysigline{\bfcode{python\_type}}
\end{fulllineitems}


\end{fulllineitems}

\index{UUID (class in abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.UUID}\pysiglinewithargsret{\strong{class }\bfcode{UUID}}{\emph{*args}, \emph{**kwargs}}{}
Platform-independent UUID type.

Uses Postgresql's UUID type, otherwise uses
CHAR(32), storing as stringified hex values.

From SQLAlchemy documentation.
\index{impl (UUID attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.UUID.impl}\pysigline{\bfcode{impl}}
alias of \code{CHAR}

\end{fulllineitems}

\index{load\_dialect\_impl() (UUID method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.UUID.load_dialect_impl}\pysiglinewithargsret{\bfcode{load\_dialect\_impl}}{\emph{dialect}}{}
\end{fulllineitems}

\index{process\_bind\_param() (UUID method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.UUID.process_bind_param}\pysiglinewithargsret{\bfcode{process\_bind\_param}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}

\index{process\_result\_value() (UUID method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.UUID.process_result_value}\pysiglinewithargsret{\bfcode{process\_result\_value}}{\emph{value}, \emph{dialect}}{}
\end{fulllineitems}


\end{fulllineitems}

\index{JSONDict() (in module abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSONDict}\pysiglinewithargsret{\bfcode{JSONDict}}{\emph{*args}, \emph{**kwargs}}{}
Stores a dict as JSON on database, with mutability support.

\end{fulllineitems}

\index{JSONList() (in module abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.JSONList}\pysiglinewithargsret{\bfcode{JSONList}}{\emph{*args}, \emph{**kwargs}}{}
Stores a list as JSON on database, with mutability support.

If kwargs has a param \emph{unique\_sorted} (which evaluated to True), list values
are made unique and sorted.

\end{fulllineitems}

\index{filter\_cols() (in module abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.filter_cols}\pysiglinewithargsret{\bfcode{filter\_cols}}{\emph{model}, \emph{*filtered\_columns}}{}
Return columnsnames for a model except named ones. Useful for defer()
for example to retain only columns of interest

\end{fulllineitems}

\index{ping\_connection() (in module abilian.core.sqlalchemy)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.sqlalchemy.ping_connection}\pysiglinewithargsret{\bfcode{ping\_connection}}{\emph{dbapi\_connection}, \emph{connection\_record}, \emph{connection\_proxy}}{}
Ensure connections are valid.

From: \emph{http://docs.sqlalchemy.org/en/rel\_0\_8/core/pooling.html}

In case db has been restarted pool may return invalid connections.

\end{fulllineitems}



\subsection{Module \texttt{abilian.core.models}}
\label{api:module-abilian-core-models}

\subsection{Module \texttt{abilian.core.util}}
\label{api:module-abilian-core-util}\label{api:module-abilian.core.util}\index{abilian.core.util (module)}
Various tools that don't belong some place specific.
\index{BasePresenter (class in abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.BasePresenter}\pysiglinewithargsret{\strong{class }\bfcode{BasePresenter}}{\emph{model}}{}
A presenter wraps a model an adds specific (often, web-centric) accessors.
subclass to make it useful. Presenters are immutable.
\index{wrap\_collection() (abilian.core.util.BasePresenter class method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.BasePresenter.wrap_collection}\pysiglinewithargsret{\strong{classmethod }\bfcode{wrap\_collection}}{\emph{models}}{}
\end{fulllineitems}


\end{fulllineitems}

\index{Pagination (class in abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.Pagination}\pysiglinewithargsret{\strong{class }\bfcode{Pagination}}{\emph{page}, \emph{per\_page}, \emph{total\_count}}{}~\index{iter\_pages() (Pagination method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.Pagination.iter_pages}\pysiglinewithargsret{\bfcode{iter\_pages}}{\emph{left\_edge=2}, \emph{left\_current=2}, \emph{right\_current=5}, \emph{right\_edge=2}}{}
\end{fulllineitems}

\index{has\_next (Pagination attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.Pagination.has_next}\pysigline{\bfcode{has\_next}}
\end{fulllineitems}

\index{has\_prev (Pagination attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.Pagination.has_prev}\pysigline{\bfcode{has\_prev}}
\end{fulllineitems}

\index{next (Pagination attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.Pagination.next}\pysigline{\bfcode{next}}
\end{fulllineitems}

\index{pages (Pagination attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.Pagination.pages}\pysigline{\bfcode{pages}}
\end{fulllineitems}

\index{prev (Pagination attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.Pagination.prev}\pysigline{\bfcode{prev}}
\end{fulllineitems}


\end{fulllineitems}

\index{memoized (class in abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.memoized}\pysiglinewithargsret{\strong{class }\bfcode{memoized}}{\emph{func}}{}
Decorator. Caches a function's return value each time it is called.
If called later with the same arguments, the cached value is returned
(not reevaluated).

\end{fulllineitems}

\index{timer (class in abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.timer}\pysiglinewithargsret{\strong{class }\bfcode{timer}}{\emph{f}}{}
Decorator that mesures the time it takes to run a function.

\end{fulllineitems}

\index{fqcn() (in module abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.fqcn}\pysiglinewithargsret{\bfcode{fqcn}}{\emph{cls}}{}
Fully Qualified Class Name

\end{fulllineitems}

\index{friendly\_fqcn() (in module abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.friendly_fqcn}\pysiglinewithargsret{\bfcode{friendly\_fqcn}}{\emph{cls\_name}}{}
Friendly name of fully qualified class name.
:param cls\_name: a string or a class

\end{fulllineitems}

\index{get\_params() (in module abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.get_params}\pysiglinewithargsret{\bfcode{get\_params}}{\emph{names}}{}
Returns a dictionary with params from request.

TODO: I think we don't use it anymore and it should be removed before
someone gets hurt.

\end{fulllineitems}

\index{local\_dt() (in module abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.local_dt}\pysiglinewithargsret{\bfcode{local\_dt}}{\emph{dt}}{}
Return an aware datetime in system timezone, from a naive or aware
datetime. Naive datetime are assumed to be in UTC TZ.

\end{fulllineitems}

\index{noproxy() (in module abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.noproxy}\pysiglinewithargsret{\bfcode{noproxy}}{\emph{obj}}{}
Unwrap obj from werkzeug.local.LocalProxy if needed. This is required if
one want to test \emph{isinstance(obj, SomeClass)}.

\end{fulllineitems}

\index{slugify() (in module abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.slugify}\pysiglinewithargsret{\bfcode{slugify}}{\emph{value}, \emph{separator=u'-`}}{}
Slugify an unicode string, to make it URL friendly.

\end{fulllineitems}

\index{utc\_dt() (in module abilian.core.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.core.util.utc_dt}\pysiglinewithargsret{\bfcode{utc\_dt}}{\emph{dt}}{}
set UTC timezone on a datetime object. A naive datetime is assumed to be
in UTC TZ

\end{fulllineitems}



\section{Package \texttt{abilian.services}}
\label{api:package-abilian-services}

\subsection{Module \texttt{abilian.services.base}}
\label{api:module-abilian-services-base}

\subsection{Module \texttt{abilian.services.activity}}
\label{api:module-abilian-services-activity}

\subsection{Module \texttt{abilian.services.audit}}
\label{api:module-abilian-services-audit}

\subsection{Module \texttt{abilian.services.conversion}}
\label{api:module-abilian-services-conversion}

\subsection{Module \texttt{abilian.services.image}}
\label{api:module-abilian-services-image}

\subsection{Module \texttt{abilian.services.indexing}}
\label{api:module-abilian-services-indexing}

\subsection{Module \texttt{abilian.services.security}}
\label{api:module-abilian-services-security}

\section{Package \texttt{abilian.web}}
\label{api:package-abilian-web}

\subsection{Module \texttt{abilian.web.decorators}}
\label{api:module-abilian.web.decorators}\label{api:module-abilian-web-decorators}\index{abilian.web.decorators (module)}
Useful decorators for web views.
\index{templated() (in module abilian.web.decorators)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.decorators.templated}\pysiglinewithargsret{\bfcode{templated}}{\emph{template=None}}{}
The idea of this decorator is that you return a dictionary with the values
passed to the template from the view function and the template
is automatically rendered.

@deprecated

\end{fulllineitems}



\subsection{Module \texttt{abilian.web.filters}}
\label{api:module-abilian-web-filters}

\subsection{Module \texttt{abilian.web.action}}
\label{api:module-abilian.web.action}\label{api:module-abilian-web-action}\index{abilian.web.action (module)}\index{ActionRegistry (class in abilian.web.action)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ActionRegistry}\pysigline{\strong{class }\bfcode{ActionRegistry}}
The Action registry.

This is a Flask extension which registers {\hyperref[api:abilian.web.action.Action]{\emph{\code{Action}}}} sets. Actions are
grouped by category and are ordered by registering order.

From your application use the instanciated registry \code{actions}.

The registry is available in jinja2 templates as \emph{actions}.
\index{actions() (ActionRegistry method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ActionRegistry.actions}\pysiglinewithargsret{\bfcode{actions}}{\emph{context=None}}{}
Return a mapping of category =\textgreater{} actions list.

Actions are filtered according to {\hyperref[api:abilian.web.action.Action.available]{\emph{\code{Action.available()}}}}.

if \emph{context} is None, then current action context is used
({\hyperref[api:abilian.web.action.ActionRegistry.context]{\emph{\code{context}}}}).

\end{fulllineitems}

\index{for\_category() (ActionRegistry method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ActionRegistry.for_category}\pysiglinewithargsret{\bfcode{for\_category}}{\emph{category}, \emph{context=None}}{}
Returns actions list for this category in current application.

Actions are filtered according to {\hyperref[api:abilian.web.action.Action.available]{\emph{\code{Action.available()}}}}.

if \emph{context} is None, then current action context is used
({\hyperref[api:abilian.web.action.ActionRegistry.context]{\emph{\code{context}}}})

\end{fulllineitems}

\index{init\_app() (ActionRegistry method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ActionRegistry.init_app}\pysiglinewithargsret{\bfcode{init\_app}}{\emph{app}}{}
\end{fulllineitems}

\index{installed() (ActionRegistry method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ActionRegistry.installed}\pysiglinewithargsret{\bfcode{installed}}{\emph{app=None}}{}
Return \emph{True} if the registry has been installed in current applications

\end{fulllineitems}

\index{register() (ActionRegistry method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ActionRegistry.register}\pysiglinewithargsret{\bfcode{register}}{\emph{*actions}}{}
Register \emph{actions} in the current application. All \emph{actions} must be an
instance of {\hyperref[api:abilian.web.action.Action]{\emph{\code{Action}}}} or one of its subclasses.

If \emph{overwrite} is \emph{True}, then it is allowed to overwrite an existing
action with same name and category; else \emph{ValueError} is raised.

\end{fulllineitems}

\index{context (ActionRegistry attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ActionRegistry.context}\pysigline{\bfcode{context}}
Return action context (dict type). Applications can modify it to suit
their needs.

\end{fulllineitems}


\end{fulllineitems}

\index{Action (class in abilian.web.action)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action}\pysiglinewithargsret{\strong{class }\bfcode{Action}}{\emph{category}, \emph{name}, \emph{title=None}, \emph{description=None}, \emph{icon=None}, \emph{url=None}, \emph{endpoint=None}, \emph{condition=None}, \emph{status=None}}{}
Action interface.
\index{Action.Endpoint (class in abilian.web.action)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.Endpoint}\pysiglinewithargsret{\strong{class }\bfcode{Endpoint}}{\emph{name}, \emph{*args}, \emph{**kwargs}}{}~\index{get\_kwargs() (Action.Endpoint method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.Endpoint.get_kwargs}\pysiglinewithargsret{\bfcode{get\_kwargs}}{}{}
Hook for subclasses.

The key and values in the returned dictionnary can be safely changed
without side effects on self.kwargs (provided you don't alter
mutable values, like calling list.pop()).

\end{fulllineitems}


\end{fulllineitems}

\index{available() (Action method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.available}\pysiglinewithargsret{\code{Action.}\bfcode{available}}{\emph{context}}{}
Determine if this actions is available in this \emph{context}.
\begin{quote}\begin{description}
\item[{Parameters}] \leavevmode
\textbf{\texttt{context}} -- a dict whose content is left to application needs; if
{\hyperref[api:abilian.web.action.Action.condition]{\emph{\code{condition}}}} is a callable it receives \emph{context}
in parameter.

\end{description}\end{quote}

\end{fulllineitems}

\index{get\_render\_args() (Action method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.get_render_args}\pysiglinewithargsret{\code{Action.}\bfcode{get\_render\_args}}{\emph{**kwargs}}{}
\end{fulllineitems}

\index{pre\_condition() (Action method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.pre_condition}\pysiglinewithargsret{\code{Action.}\bfcode{pre\_condition}}{\emph{context}}{}
Called by {\hyperref[api:abilian.web.action.Action.available]{\emph{\code{available()}}}} before checking condition.

Subclasses may override it to ease creating actions with repetitive
check (for example: actions that apply on a given content type
only).

\end{fulllineitems}

\index{render() (Action method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.render}\pysiglinewithargsret{\code{Action.}\bfcode{render}}{\emph{**kwargs}}{}
\end{fulllineitems}

\index{url() (Action method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.url}\pysiglinewithargsret{\code{Action.}\bfcode{url}}{\emph{context=None}}{}
\end{fulllineitems}

\index{CSS\_CLASS (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.CSS_CLASS}\pysigline{\code{Action.}\bfcode{CSS\_CLASS}\strong{ = u'action action-\{category\} action-\{category\}-\{name\}'}}
\end{fulllineitems}

\index{category (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.category}\pysigline{\code{Action.}\bfcode{category}\strong{ = None}}
\end{fulllineitems}

\index{condition (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.condition}\pysigline{\code{Action.}\bfcode{condition}\strong{ = None}}
A boolean (or something that can be converted to boolean), or a callable
which accepts a context dict as parameter. See {\hyperref[api:abilian.web.action.Action.available]{\emph{\code{available()}}}}.

\end{fulllineitems}

\index{description (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.description}\pysigline{\code{Action.}\bfcode{description}}
\end{fulllineitems}

\index{enabled (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.enabled}\pysigline{\code{Action.}\bfcode{enabled}}
\end{fulllineitems}

\index{endpoint (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.endpoint}\pysigline{\code{Action.}\bfcode{endpoint}}
A {\hyperref[api:abilian.web.action.Action.Endpoint]{\emph{\code{Endpoint}}}} instance, a string for a simple endpoint, a tuple
\code{(endpoint\_name, kwargs)}  or a callable which accept a : context dict
and returns one of those a valid values.

\end{fulllineitems}

\index{icon (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.icon}\pysigline{\code{Action.}\bfcode{icon}}
\end{fulllineitems}

\index{name (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.name}\pysigline{\code{Action.}\bfcode{name}\strong{ = None}}
\end{fulllineitems}

\index{status (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.status}\pysigline{\code{Action.}\bfcode{status}}
\end{fulllineitems}

\index{template\_string (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.template_string}\pysigline{\code{Action.}\bfcode{template\_string}\strong{ = u'\textless{}a class=''\{\{ action.css\_class \}\}'' href=''\{\{ url \}\}''\textgreater{}\{\%- if action.icon \%\}\{\{ action.icon \}\} \{\% endif \%\}\{\{ action.title \}\}\textless{}/a\textgreater{}'}}
\end{fulllineitems}

\index{title (Action attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.Action.title}\pysigline{\code{Action.}\bfcode{title}}
\end{fulllineitems}


\end{fulllineitems}

\index{ModalActionMixin (class in abilian.web.action)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ModalActionMixin}\pysigline{\strong{class }\bfcode{ModalActionMixin}}~\index{template\_string (ModalActionMixin attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.action.ModalActionMixin.template_string}\pysigline{\bfcode{template\_string}\strong{ = u'\textless{}a class=''\{\{ action.css\_class \}\}'' href=''\{\{ url \}\}'' data-toggle=''modal''\textgreater{}\{\%- if action.icon \%\}\{\{ action.icon\}\} \{\% endif \%\}\{\{ action.title \}\}\textless{}/a\textgreater{}'}}
\end{fulllineitems}


\end{fulllineitems}



\subsection{Module \texttt{abilian.web.nav}}
\label{api:module-abilian.web.nav}\label{api:module-abilian-web-nav}\index{abilian.web.nav (module)}
Navigation elements.
\begin{description}
\item[{Abilian define theses categories:}] \leavevmode\begin{description}
\item[{\emph{section}:}] \leavevmode
Used for navigation elements relevant to site section

\item[{\emph{user}:}] \leavevmode
User for element that should appear in user menu

\end{description}

\end{description}
\index{BreadcrumbItem (class in abilian.web.nav)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.BreadcrumbItem}\pysiglinewithargsret{\strong{class }\bfcode{BreadcrumbItem}}{\emph{label=u'`}, \emph{url=u'\#'}, \emph{icon=None}, \emph{description=None}}{}
A breadcrumb element has at least a label or an icon.
\index{render() (BreadcrumbItem method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.BreadcrumbItem.render}\pysiglinewithargsret{\bfcode{render}}{}{}
\end{fulllineitems}

\index{description (BreadcrumbItem attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.BreadcrumbItem.description}\pysigline{\bfcode{description}\strong{ = None}}
Additional text, can be used as tooltip for example

\end{fulllineitems}

\index{icon (BreadcrumbItem attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.BreadcrumbItem.icon}\pysigline{\bfcode{icon}\strong{ = None}}
Icon to use.

\end{fulllineitems}

\index{label (BreadcrumbItem attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.BreadcrumbItem.label}\pysigline{\bfcode{label}\strong{ = None}}
Label shown to user. May be an i18n string instance

\end{fulllineitems}

\index{template\_string (BreadcrumbItem attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.BreadcrumbItem.template_string}\pysigline{\bfcode{template\_string}\strong{ = u'\{\%- if url \%\}\textless{}a href=''\{\{ url \}\}''\textgreater{}\{\%- endif \%\}\{\%- if item.icon \%\}\{\{ item.icon \}\}\textbackslash{}xa0\{\%- endif \%\}\{\{ item.label \}\}\{\%- if url \%\}\textless{}/a\textgreater{}\{\%- endif \%\}'}}
\end{fulllineitems}

\index{url (BreadcrumbItem attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.BreadcrumbItem.url}\pysigline{\bfcode{url}}
\end{fulllineitems}


\end{fulllineitems}

\index{NavGroup (class in abilian.web.nav)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavGroup}\pysiglinewithargsret{\strong{class }\bfcode{NavGroup}}{\emph{category}, \emph{name}, \emph{items=()}, \emph{*args}, \emph{**kwargs}}{}
A navigation group renders a list of items.
\index{append() (NavGroup method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavGroup.append}\pysiglinewithargsret{\bfcode{append}}{\emph{item}}{}
\end{fulllineitems}

\index{get\_render\_args() (NavGroup method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavGroup.get_render_args}\pysiglinewithargsret{\bfcode{get\_render\_args}}{\emph{**kwargs}}{}
\end{fulllineitems}

\index{insert() (NavGroup method)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavGroup.insert}\pysiglinewithargsret{\bfcode{insert}}{\emph{pos}, \emph{item}}{}
\end{fulllineitems}

\index{status (NavGroup attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavGroup.status}\pysigline{\bfcode{status}}
\end{fulllineitems}

\index{template\_string (NavGroup attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavGroup.template_string}\pysigline{\bfcode{template\_string}\strong{ = `\textbackslash{}n    \textless{}ul class=''nav navbar-nav \{\{ action.css\_class \}\}''\textgreater{}\textbackslash{}n      \textless{}li class=''dropdown''\textgreater{}\textbackslash{}n        \textless{}a class=''dropdown-toggle'' data-toggle=''dropdown''\textgreater{}\textbackslash{}n          \{\%- if action.icon \%\}\{\{ action.icon \}\}\{\% endif \%\}\textbackslash{}n          \{\{ action.title \}\} \textless{}b class=''caret''\textgreater{}\textless{}/b\textgreater{}\textbackslash{}n        \textless{}/a\textgreater{}\textbackslash{}n        \textless{}ul class=''dropdown-menu''\textgreater{}\textbackslash{}n          \{\%- for item in action\_items \%\}\textbackslash{}n          \{\%- if item.divider \%\}\textless{}li class=''divider''\textgreater{}\textless{}/li\textgreater{}\{\%- endif \%\}\textbackslash{}n          \textless{}li class=''\{\{ item.status\textbar{}safe \}\}''\textgreater{}\{\{ item.render() \}\}\textless{}/li\textgreater{}\textbackslash{}n          \{\%- endfor \%\}\textbackslash{}n        \textless{}/ul\textgreater{}\textbackslash{}n      \textless{}/li\textgreater{}\textbackslash{}n    \textless{}/ul\textgreater{}\textbackslash{}n    `}}
\end{fulllineitems}


\end{fulllineitems}

\index{NavItem (class in abilian.web.nav)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavItem}\pysiglinewithargsret{\strong{class }\bfcode{NavItem}}{\emph{category}, \emph{name}, \emph{divider=False}, \emph{*args}, \emph{**kwargs}}{}
A single navigation item.
\index{divider (NavItem attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavItem.divider}\pysigline{\bfcode{divider}\strong{ = False}}
\end{fulllineitems}

\index{path (NavItem attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavItem.path}\pysigline{\bfcode{path}}
\end{fulllineitems}

\index{status (NavItem attribute)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.nav.NavItem.status}\pysigline{\bfcode{status}}
\end{fulllineitems}


\end{fulllineitems}



\subsection{Module \texttt{abilian.web.forms}}
\label{api:module-abilian-web-forms}

\subsection{Module \texttt{abilian.web.views}}
\label{api:module-abilian-web-views}

\subsection{Module \texttt{abilian.web.frontend}}
\label{api:module-abilian-web-frontend}

\subsection{Module \texttt{abilian.web.util}}
\label{api:module-abilian.web.util}\label{api:module-abilian-web-util}\index{abilian.web.util (module)}
A few utility functions.

See \href{https://docs.djangoproject.com/en/dev/topics/http/shortcuts/}{https://docs.djangoproject.com/en/dev/topics/http/shortcuts/} for more ideas
of stuff to implement.
\index{capture\_stream\_errors() (in module abilian.web.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.util.capture_stream_errors}\pysiglinewithargsret{\bfcode{capture\_stream\_errors}}{\emph{logger}, \emph{msg}}{}
Decorator that capture and log errors during streamed response.

Decorated function is automatically decorated with
:func:\textless{}\emph{Flask.stream\_with\_context}\textgreater{}.

@param logger: a logger name or logger instance
@param msg: message to log

\end{fulllineitems}

\index{get\_object\_or\_404() (in module abilian.web.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.util.get_object_or_404}\pysiglinewithargsret{\bfcode{get\_object\_or\_404}}{\emph{cls}, \emph{*args}}{}
Shorthand similar to Django's \emph{get\_object\_or\_404}.

\end{fulllineitems}

\index{send\_file\_from\_directory() (in module abilian.web.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.util.send_file_from_directory}\pysiglinewithargsret{\bfcode{send\_file\_from\_directory}}{\emph{filename}, \emph{directory}, \emph{app=None}}{}
Helper to add static rules, like in \emph{abilian.app}.app

Example use:

\begin{Verbatim}[commandchars=\\\{\}]
\PYG{n}{app}\PYG{o}{.}\PYG{n}{add\PYGZus{}url\PYGZus{}rule}\PYG{p}{(}
   \PYG{n}{app}\PYG{o}{.}\PYG{n}{static\PYGZus{}url\PYGZus{}path} \PYG{o}{+} \PYG{l+s}{\PYGZsq{}}\PYG{l+s}{/abilian/\PYGZlt{}path:filename\PYGZgt{}}\PYG{l+s}{\PYGZsq{}}\PYG{p}{,}
   \PYG{n}{endpoint}\PYG{o}{=}\PYG{l+s}{\PYGZsq{}}\PYG{l+s}{abilian\PYGZus{}static}\PYG{l+s}{\PYGZsq{}}\PYG{p}{,}
   \PYG{n}{view\PYGZus{}func}\PYG{o}{=}\PYG{n}{partial}\PYG{p}{(}\PYG{n}{send\PYGZus{}file\PYGZus{}from\PYGZus{}directory}\PYG{p}{,}
                     \PYG{n}{directory}\PYG{o}{=}\PYG{l+s}{\PYGZsq{}}\PYG{l+s}{/path/to/static/files/dir}\PYG{l+s}{\PYGZsq{}}\PYG{p}{)}\PYG{p}{)}
\end{Verbatim}

\end{fulllineitems}

\index{url\_for() (in module abilian.web.util)}

\begin{fulllineitems}
\phantomsection\label{api:abilian.web.util.url_for}\pysiglinewithargsret{\bfcode{url\_for}}{\emph{obj}, \emph{**kw}}{}
Polymorphic variant of Flask's \emph{url\_for} function.

Behaves like the original function when the first argument is a string.
When it's an object, it

\end{fulllineitems}



\section{Package \texttt{abilian.testing}}
\label{api:package-abilian-testing}

\chapter{Changelog for Abilian Core}
\label{changelog::doc}\label{changelog:changelog-for-abilian-core}

\section{0.3.5 (2015-05-27)}
\label{changelog:id1}

\subsection{Features}
\label{changelog:features}\begin{itemize}
\item {} 
default user avatar is now a circle with their last name initial (\#12)

\item {} 
add PRIVATE\_SITE, app, blueprint and endpoint access controller registration

\item {} 
Better handling of CSRF failures

\item {} 
add dynamic row widget js

\item {} 
js: add datatable advanced search

\end{itemize}


\subsection{Fixes}
\label{changelog:fixes}\begin{itemize}
\item {} 
CSS (Bootstrap) fixes

\item {} 
Permissions fixes

\end{itemize}


\section{Updates}
\label{changelog:updates}\begin{itemize}
\item {} 
Updated Bootstrap to 3.3.4

\item {} 
Updated flask-login to 0.2.11

\item {} 
Updated Sentry JS code to 1.1.18

\end{itemize}


\section{0.3.4 (2015-04-14)}
\label{changelog:id2}\begin{itemize}
\item {} 
updated Select2 to 3.5.2

\item {} 
enhanced fields and widgets

\item {} 
set default SQLALCHEMY\_POOL\_RECYCLE to 30 minutes

\item {} 
Users admin panel: fix roles not set; fix all assignable roles not listed; fix
cannot set password during user creation.

\end{itemize}


\section{0.3.3 (2015-03-31)}
\label{changelog:id3}

\subsection{Features}
\label{changelog:id4}\begin{itemize}
\item {} 
Use ravenjs to monitor JS errors with Sentry

\item {} 
Vocabularies

\end{itemize}


\section{0.3.2 (2014-12-23)}
\label{changelog:id5}\begin{itemize}
\item {} 
Minor bugfixes

\end{itemize}


\section{0.3.1 (2014-12-23)}
\label{changelog:id6}\begin{itemize}
\item {} 
Minor bugfixes

\end{itemize}


\section{0.3.0 (2014-12-23)}
\label{changelog:id7}

\subsection{Features}
\label{changelog:id8}\begin{itemize}
\item {} 
Added a virus scanner.

\item {} 
Changed the WYSIWYG editor to Scribe.

\item {} 
Vocabularies

\end{itemize}


\subsection{API changes}
\label{changelog:api-changes}\begin{itemize}
\item {} 
Deprecated the @templated decorator (will be removed in 0.4.0).

\end{itemize}


\subsection{Building, tests}
\label{changelog:building-tests}\begin{itemize}
\item {} 
Build: Use pbr to simplify setup.py.

\item {} 
Dependencies: moved deps to ./requirements.txt + cleanup / update.

\item {} 
Testing: Tox and Travis config updates.

\item {} 
Testing: Run tests under Vagrant.

\item {} 
QA: Fixed many pyflakes warnings.

\end{itemize}


\section{0.2.0 (2014-08-07)}
\label{changelog:id9}\begin{itemize}
\item {} 
Too long to list.

\end{itemize}


\section{0.1.4 (2014-03-27)}
\label{changelog:id10}\begin{itemize}
\item {} 
refactored abilian.core.entities, abilian.core.subjects. New module
abilian.core.models containing modules: base, subjects, owned.

\item {} 
Fixed or cleaned up dependencies.

\item {} 
Fixed setupwizard.

\item {} 
added config value: BABEL\_ACCEPT\_LANGUAGES, to limit supported languages and
change order during negociation

\item {} 
Switched CSS to LESS.

\item {} 
Updated to Bootstrap 3.1.1

\end{itemize}


\section{0.1.3 (2014-02-03)}
\label{changelog:id11}\begin{itemize}
\item {} 
Update some dependencies

\item {} 
Added login/logout via JSON api

\item {} 
Added `createuser' command

\end{itemize}


\section{0.1.2 (2014-01-11)}
\label{changelog:id12}\begin{itemize}
\item {} 
added jinja extension to collect JS snippets during page generation and put
them at end of document (``deferred'')

\item {} 
added basic javascript to prevent double submission

\item {} 
Added Flask-Migrate

\end{itemize}


\section{0.1.1 (2013-12-26)}
\label{changelog:id13}\begin{itemize}
\item {} 
Redesigned indexing:
\begin{itemize}
\item {} 
single whoosh index for all objects

\item {} 
search results page do not need anymore to fetch actual object from database

\item {} 
index security information, used for filtering search results

\item {} 
Added ``reindex'' shell command

\end{itemize}

\end{itemize}


\section{0.1 (2013-12-13)}
\label{changelog:id14}\begin{itemize}
\item {} 
Initial release.

\end{itemize}


\chapter{Credits}
\label{credits:credits}\label{credits::doc}

\section{Design, programming}
\label{credits:design-programming}
Abilian development team: 2012-2013.


\section{Art (images, icons)}
\label{credits:art-images-icons}
See links for copyright and licences (usually Creative Commons).
\begin{itemize}
\item {} 
Background image(s) for login:
Kevin Dooley \href{http://www.flickr.com/photos/pagedooley/}{http://www.flickr.com/photos/pagedooley/}.

\item {} 
File types icons:
\href{http://www.splitbrain.org/projects/file\_icons}{http://www.splitbrain.org/projects/file\_icons}.

\item {} 
Animal pictures:
\href{http://en.wikipedia.org/wiki/Wikipedia:Featured\_pictures/Animals\#Animals}{http://en.wikipedia.org/wiki/Wikipedia:Featured\_pictures/Animals\#Animals}.

\item {} 
Group pictures:
\href{http://en.wikipedia.org/wiki/File:Estudiante\_INTEC.jpg}{http://en.wikipedia.org/wiki/File:Estudiante\_INTEC.jpg},
\href{http://en.wikipedia.org/wiki/File:Salesman\_-beach\_-\_bikini-\_sun-27Dec2008.jpg}{http://en.wikipedia.org/wiki/File:Salesman\_-beach\_-\_bikini-\_sun-27Dec2008.jpg},
\href{http://en.wikipedia.org/wiki/File:Cocacola-5cents-1900\_edit1.jpg}{http://en.wikipedia.org/wiki/File:Cocacola-5cents-1900\_edit1.jpg}.

\item {} 
Group Icon (CC Attribution-Noncommercial-No Derivate 3.0):
\href{http://www.iconarchive.com/show/soft-scraps-icons-by-deleket/User-Group-icon.html}{http://www.iconarchive.com/show/soft-scraps-icons-by-deleket/User-Group-icon.html}.

\end{itemize}


\part{Indices and tables}
\label{index:indices-and-tables}\begin{itemize}
\item {} 
\DUspan{xref,std,std-ref}{genindex}

\item {} 
\DUspan{xref,std,std-ref}{modindex}

\item {} 
\DUspan{xref,std,std-ref}{search}

\end{itemize}



\renewcommand{\indexname}{Index}
\printindex
\end{document}
