Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py - Mailing list pgsql-www

From Magnus Hagander
Subject Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py
Date
Msg-id CABUevExDcZyiHERttpJuWtG3vEKctFbW_V_mod7HL+29cCm6bQ@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py  (Célestin Matte <celestin.matte@cmatte.me>)
Responses Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py  (Célestin Matte <celestin.matte@cmatte.me>)
List pgsql-www


On Sun, Oct 31, 2021 at 7:02 PM Célestin Matte <celestin.matte@cmatte.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? 

--

pgsql-www by date:

Previous
From: Célestin Matte
Date:
Subject: Issue report: search function not working for private lists
Next
From: Magnus Hagander
Date:
Subject: Re: Issue report: search function not working for private lists