Make study listings async

This is a first attempt start at making things async. As an example, this makes the creation of the study listings async so the loading is non-blocking or other pages.
Oh, there are ORM instances in the templates? Thats not good... I see what
you're saying now. Yes, we need to pull those out of the templates
On Oct 24, 2014 4:32 PM, "Joshua Shorenstein" <notifications@github.com>
wrote:

> In qiita_pet/handlers/study_handlers.py:
>
> >          self.render('public_studies.html', user=self.current_user,
> >                      public_studies=public_studies)
> >
> > +    def _get_public(self, callback):
> > +        callback([Study(s_id) for s_id in Study.get_public()])
>
> The issue is I have no idea if template rendering can be async'ed, so if
> we do all the calls in a known async'ed function we can just have a
> dictionary of {study: [info1, info2, ....], ....} come out of the function
> instead of just a list of objects. This way we know the DB calls are all
> async'ed and just pop in info variable values in the template instead of
> doing DB calls with the objects.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/biocore/qiita/pull/496/files#r19341685>.
>