Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py

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: [PATCH] pglister: Add possibility to override settings.py in settings_local.py
Date: 2021-11-04 10:24:25
Message-ID: CABUevExDcZyiHERttpJuWtG3vEKctFbW_V_mod7HL+29cCm6bQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Sun, Oct 31, 2021 at 7:02 PM Célestin Matte <celestin(dot)matte(at)cmatte(dot)me>
wrote:

> Hello,
>
> >
> > And finally, settings.py already contains:
> > try:
> > from .local_settings import *
> > except ImportError:
> > pass
> >
> >
> > Just a couple of lines above where you are adding it back again. Is that
> also for some reason not working?
>
> Right, I missed that. It's just that in pgweb and pgarchives, the file is
> called settings_local.py, whereas pglister calls it local_settings.py. This
> is just a question of naming consistency, then. Do you think it's worth
> patching?
>

If anything, we'd want to move to local_settings.py in that case -- the
reason we switched to doing that in a bunch of the other projects is TBH
something as simple as "then tab completion works better".

In general we've said it's not worth breaking compat for it on the old
repos though. That can obviously be argued. But if we do, we definitely
don't want to do *both*, in that case we should remove them.

> > Second, I'm not sure why we want to exclude local_settings.py from
> pycodestyle in general?
>
> It's ignored in pgweb, I just assumed there was a good reason for that and
> did the same thing for consistency.
>

Oh, I wasn't even aware of that. TBH, I'm not sure that's intentional, that
may be a leak from "it was easiest to do that in the beginning".

I don't really see a reason why we wouldn't want that file to be scanned as
well -- do you?

--
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

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Magnus Hagander 2021-11-04 10:25:57 Re: Issue report: search function not working for private lists
Previous Message Célestin Matte 2021-11-04 09:41:55 Issue report: search function not working for private lists