Programmatically return job results

This pull request removes the hard coded links to job results in the analysis results page and instead makes the job object return actual filepaths to html files or result files. It uses glob to search through directories for html pages or, if a single file result, adds that file as a job result.
:+1:

Yoshiki Vázquez-Baeza

> On Sep 15, 2014, at 8:58 PM, adamrp <notifications@github.com> wrote:
> 
> In qiita_db/job.py:
> 
> >              "(SELECT filepath_id FROM qiita.job_results_filepath "
> > -            "WHERE job_id = %s)",
> > -            (self._id, ))
> > +            "WHERE job_id = %s)", (self._id, ))
> > +
> > +        def add_html(basedir, check_dir, result_fps):
> > +            for res in glob(join(basedir, check_dir, "*.htm*")):
> a safer glob pattern would be "*.htm{l,}", so that you're specifically checking whether the filename ends in .htm or .html (rather than just containing it, like 'some_old_fle.html.backup' does)
> 
> —
> Reply to this email directly or view it on GitHub.