Re: Add versions.json endpoint with latest release information

From: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
To: Sehrope Sarkuni <sehrope(at)jackdb(dot)com>, PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Add versions.json endpoint with latest release information
Date: 2021-04-27 21:09:06
Message-ID: 075b90e7-4796-4283-4d75-fc9916463b4f@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

Hi Sehrope,

On 4/27/21 2:25 PM, Sehrope Sarkuni wrote:
> Hello,
>
> The attached patch adds a /versions.json endpoint with the latest
> release information. The response is a machine parseable JSON array with
> one entry per release.
>
> For simplicity the patch keeps the same field names in the response as
> the django model. Someone else with more familiarity with django may
> want to change that (tree => major?).

Thanks for proposing this. This seems reasonable. I wanted to see if we
could have leveraged "VersionFeed" for this, but TIL the django
syndication views[1].

I would suggest modeling the query after what we are doing with the RSS
feed[2].

Thanks,

Jonathan

[1] https://docs.djangoproject.com/en/3.2/ref/contrib/syndication/
[2]
https://git.postgresql.org/gitweb/?p=pgweb.git;a=blob;f=pgweb/core/feeds.py;hb=HEAD

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Sehrope Sarkuni 2021-04-28 13:29:04 Re: Add versions.json endpoint with latest release information
Previous Message Jonathan S. Katz 2021-04-27 20:58:50 Re: Google Summer of Code 2021 - last call for mentors