Re: Feature requests: some components still depend on postgresql.org deployment

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
Cc: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: Feature requests: some components still depend on postgresql.org deployment
Date: 2021-11-10 11:58:27
Message-ID: CABUevExy3uCmseaa5O=_NQ_deo6vbzX9e0inqWFA_ifuBjyybg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Mon, Nov 8, 2021 at 9:02 PM Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
wrote:

> Hello,
>
> As I've finished installing pglister and its components, it appears that
> part of them still make it difficult to install a non-postgresql.org
> instance. I'm thinking of two issues:
>
> - Pgweb's auth is a part of pgweb, an application running most of
> postgresql.org's website. I would be great if that component could be
> separated from pgweb, so that users can deploy it easily, without having to
> maintain the whole repository.
> If other software providing the same auth function already exist and could
> be used instead of pgweb, feel free to point them to me.
>

For a standalone installation of pglister, it should be possible to just
use the django authentication system (or any other plugin for that). If you
just set USE_PG_COMMUNITY_AUTH=False. If there are things missing in a
setup like that, I think that's should be fixed, rather than cementing the
connection with pgweb.

- In the different repositories, some files contain links and elements
> related to postgresql.org:
> * home.html (pglister): main page with instructions for postgresql.org
> * base.html (pgweb, pgarchives): headers, navigation bar
> * index.html (pgweb, pgarchives): main page, contains news etc.
> * page.html (pgarchives): quick links for navigation
> * context.py (pgweb): site navigation structure
>
> It would be great to find a solution to make these files configurable for
> a new deployment.
>

Per above, I don't think pgweb should be part of this, as that has never
been intended to be used outside of www.postgresql.org, and I don't think
it should be.

For the other two, pglister and pgarchives, yes, being able to do that
makes a lot of sense.

I wonder if we can get away with doing something as simple as the
pgeu-system "skin directory" setup. Basically, for those you can configure
a SYSTEM_SKIN_DIRECTORY. This directory will get it's templtes directory
inserted in the path *ahead* of anything that's in the main system, and
also a code/ directory added to the python path, and has some separate
settings etc. There's an example of a skin at
https://github.com/pgeu/pgeu-web for example (ignore the part that's
template.jinja, just the template, code and media directories are relevant.

It would still inherit dependencies like bootstrap unless one overrides
*all* templates (but for pgarchives and pglister that might actually be
reasonable to do, as there aren't that many). But definitely being able to
replace things like the "overall theme" should be fairly simple that way?

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Browse pgsql-www by date

  From Date Subject
Next Message Tim Chadwick 2021-11-10 12:13:59 Re: psycopg2 article editor access
Previous Message Magnus Hagander 2021-11-10 11:50:16 Re: [PATCH] pglister: Add example script to import from mailman