Re: Development environment setup for pgarchives and pgweb

From: Sahil Harpal <sahilharpal1234(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Development environment setup for pgarchives and pgweb
Date: 2022-06-06 18:42:50
Message-ID: CAKi=nnfoipFW7jkWY_xV0Vebem4ggbtwKsDLFE5xcZaGhEZ=Kg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

Can I get some sample data (*.json* files)? So that the dev environment
will also simulate the actual project and will cover different
possibilities/edge cases. It will be easy to set up db by directly loading
json files instead of manually adding data from the admin dashboard.
---
Sahil Harpal

On Sun, 5 Jun 2022 at 01:01, Magnus Hagander <magnus(at)hagander(dot)net> wrote:

>
>
> On Fri, Jun 3, 2022 at 8:52 PM Sahil Harpal <sahilharpal1234(at)gmail(dot)com>
> wrote:
>
>> Hello Magnus,
>> Yeah you are right /list/ will not work directly in pgweb.
>> Actually I will be working on the pages related to mailing lists (eg.
>> https://www.postgresql.org/list/,
>> https://www.postgresql.org/list/pgsql-admin/,
>> https://www.postgresql.org/list/pgsql-admin/2022-03/,
>> https://www.postgresql.org/message-id/29d1112e-0bc5-02d2-5f2f-7ed256edcea9%40gmail.com
>> etc.)
>>
>
> For those types of pages, you shouldn't need pgweb at all, since they do
> not require authentication.
>
>
>
>> I also think authentication doesn't need to access most of the
>> pgarchives' data. It will be required only to get private data. In the
>> current setup, I am running pgarchives on port 9000 and pgweb on 8000. In
>> the community auth of pgweb, I added the URL of pgarchives in the redirect
>> URL field. http://127.0.0.1:9000 redirects me to the login screen of
>> pgweb.
>>
>
> The redirect url should be http://127.0.0.1:9000/list/_auth/auth_receive/
> for pgarchives on port 9000.
>
>
>
>> I think I don't even need pgweb. In the current configuration, I changed
>> PUBLIC_ARCHIVES = True & ALLOW_RESEND = False and it worked. I guess making
>> these changes skips the authentication step, which is not required to
>> access public data.
>>
>
> Correct.
>
>
>
>> I also made a few changes to access /admin/. Since in the code present on
>> the github this part is disabled. Now I can add sample/dummy data from the
>> admin panel.
>> Since my work will involve mostly frontend parts, I think for now I don't
>> even need to think about the reverse proxy thing. I can directly work on
>> the templates directory of pgarchives.
>>
>
>
> Yes, there is no /admin/ part for the archives, as in normal usage the
> data is all fed from other systems. But I can see how it helps to add dummy
> data in a dev situation.
>
> //Magnus
>
>

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Magnus Hagander 2022-06-07 20:58:02 Re: Development environment setup for pgarchives and pgweb
Previous Message Jonathan S. Katz 2022-06-06 15:02:08 Re: Fwd: Difficult to join lists