Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miZvH-0004n5-52 for pgsql-www@arkaria.postgresql.org; Thu, 04 Nov 2021 10:24:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1miZvG-0007dH-2Q for pgsql-www@arkaria.postgresql.org; Thu, 04 Nov 2021 10:24:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1miZvF-0007d8-OP for pgsql-www@lists.postgresql.org; Thu, 04 Nov 2021 10:24:41 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1miZvC-0002gu-Qm for pgsql-www@lists.postgresql.org; Thu, 04 Nov 2021 10:24:40 +0000 Received: by mail-lj1-x230.google.com with SMTP id h11so8721215ljk.1 for ; Thu, 04 Nov 2021 03:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hagander-net.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SwHH5/C8UsqcbPi+HhqC0xnAeqmvaHrkqUhSP3TzFJE=; b=ayHnMDQ5gE6koAVF6uItYr5vXBg0wKuI+0mhBjS6t0PnZn2bM9OLWM7wd99DXDSw7h RR+c2e2VyWe9nrvm6lBElO2RBgdoWkV8Aa//fx43RBTX+zHnpJnt3rRBP4LnSUkIj3P3 b2XrUzhzQEkiBYe5HfwmsQNX41414TP173s+O/ysY9FTbnBq3jRfL0tfXvbB3I5hPvQn pFQTC6Htu/Qp4RJw4B7xO1pM4MewYDL3p3om++KZXUPAkuI/QPudnt50HU3TylsZLzMA AjYqLatuXzp+oN7M253DHWki2fcca5YIVQFvNIJJPw5gbSLV1vwlU1/Em5tXEdRA4qz9 yfeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SwHH5/C8UsqcbPi+HhqC0xnAeqmvaHrkqUhSP3TzFJE=; b=utBSJB4AMM1kHSMk67U1bUJbYu+OFffmvETi2eH03c4r6M0NSNv5/zPQK/zjdg+jQ5 qQUBL60HwGr395p3vHvGYjdmNipEFjAqt9tQMzSxMKtRCvfHPz1QEkqPu+cueRHKzSWl P/S4CQoiddUUMlIpLcyWJbcYvb90027DuXYaBLGV09fCb4LuLGCrnCVwe192N/1VvjB9 3Y69GfQC8XhtkQvpxfWg9MYx7Va2lkK8TYFuMF1nhe0yaiBAtNDYViqY9FqhTtF61c2q d6SF52nhTjP2U5t7VWnGt4DeG/iXYJhdbkI148pD2Rd1bskqOXbYsxzcXLB70ylAvQUM 7HKA== X-Gm-Message-State: AOAM530qxihmObAMtgginzCfUX/tVpnvCn4xCP+c9uSCT+/4whwJ7TBW R2kuy3xz1kV2EQWwQ/nsy7F0gDfmnPfHBqHV+5HNyeoawJI= X-Google-Smtp-Source: ABdhPJxC54X+C8dUIfNXFSdPpQZ90POZdW9dzq7lTXcQJNLRrfK3y9O7g2dmTul6LTdq9BLww/dhfkoHW9HpKiRP/y4= X-Received: by 2002:a05:651c:1032:: with SMTP id w18mr23419789ljm.329.1636021476361; Thu, 04 Nov 2021 03:24:36 -0700 (PDT) MIME-Version: 1.0 References: <4de7ef7b-cdb3-2d97-5e6a-444e48b192bf@cmatte.me> In-Reply-To: From: Magnus Hagander Date: Thu, 4 Nov 2021 11:24:25 +0100 Message-ID: Subject: Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py To: =?UTF-8?Q?C=C3=A9lestin_Matte?= Cc: PostgreSQL WWW Content-Type: multipart/alternative; boundary="000000000000f19cdf05cff3eeb7" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000f19cdf05cff3eeb7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, Oct 31, 2021 at 7:02 PM C=C3=A9lestin Matte 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 tha= t > 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. Th= is > 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 an= d > 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? --=20 Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/ --000000000000f19cdf05cff3eeb7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Oct 31, 2021 at 7:02 PM C=C3= =A9lestin Matte <celestin.ma= tte@cmatte.me> wrote:
Hello,

>
> And finally, settings.py already contains:
> try:
> =C2=A0 =C2=A0 from .local_settings import *
> except ImportError:
> =C2=A0 =C2=A0 pass
>
>
> Just a couple of lines above where you are adding it back again. Is th= at 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. T= his is just a question of naming consistency, then. Do you think it's w= orth patching?

If anything, we'd wa= nt to move to local_settings.py in that case -- the reason we switched to d= oing that in a bunch of the other projects is TBH something as simple as &q= uot;then tab completion works better".

In gen= eral we've said it's not worth breaking compat for it on the old re= pos though. That can obviously be argued. But if we do, we definitely don&#= 39;t want to do *both*, in that case we should remove them.

<= /div>
=C2=A0
> 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 inte= ntional, that may be a leak from "it was easiest to do that in the beg= inning".

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

--
=C2=A0Magnus Hagander
=C2=A0Me: https://www.hagander.net/
=C2=A0Wor= k: https://www= .redpill-linpro.com/
--000000000000f19cdf05cff3eeb7--