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

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py
Дата
Msg-id CABUevExDcZyiHERttpJuWtG3vEKctFbW_V_mod7HL+29cCm6bQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py  (Célestin Matte <celestin.matte@cmatte.me>)
Ответы Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py
Список 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 по дате отправления:

Предыдущее
От: Célestin Matte
Дата:
Сообщение: Issue report: search function not working for private lists
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Issue report: search function not working for private lists