Re: Add versions.json endpoint with latest release information - Mailing list pgsql-www

From Jonathan S. Katz
Subject Re: Add versions.json endpoint with latest release information
Date
Msg-id 075b90e7-4796-4283-4d75-fc9916463b4f@postgresql.org
Whole thread Raw
In response to Add versions.json endpoint with latest release information  (Sehrope Sarkuni <sehrope@jackdb.com>)
Responses Re: Add versions.json endpoint with latest release information
List 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


Attachment

pgsql-www by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: Re: Google Summer of Code 2021 - last call for mentors
Next
From: Sehrope Sarkuni
Date:
Subject: Re: Add versions.json endpoint with latest release information