Re: Queries regarding staticfiles | pgarchives - Mailing list pgsql-www

From Magnus Hagander
Subject Re: Queries regarding staticfiles | pgarchives
Date
Msg-id CABUevEzt2UuckA2i9JPrEyAFn-H58OOY4e_qe9GbvK_WXrxsLA@mail.gmail.com
Whole thread Raw
In response to Re: Queries regarding staticfiles | pgarchives  (Sahil Harpal <sahilharpal1234@gmail.com>)
List pgsql-www
On Thu, Jun 16, 2022 at 4:05 PM Sahil Harpal <sahilharpal1234@gmail.com> wrote:


On Wed, 15 Jun 2022 at 22:43, Magnus Hagander <magnus@hagander.net> wrote:
That depends on what webserver you're using. For example, in uwsgi you'd add something like:
static-map=/media-archives=/some/where/pgarchives/django/media 

For nginx, it'd be something like:
        location /media-archives/ {
                alias /some/where/pgarchives/django/media/;
        }

I tried this, but still, it is showing 404.
I created a .ini file and added the following values. and instead of running the server using runserver command I am using uwsgi.

[uwsgi]
http = localhost:8000
wsgi-file = archives/wsgi.py
static-map = /media-archives=/pgarchives/django/media 

Am I missing anything here?

Assuming your pgarchives checkout is in /pgarchives/ that seems like it would be correct.

I personally use the chdir setting in uwsgi rater than the wsgi-file, but that shouldn't affect the static mapping.


Oh. Yes, anything outside of /list/ is loaded from pgweb. The dyncss is one of them. And yes, this is kind of a hacky and terrible way, but that's how it is right now. Certain parts of them have to be kept in sync.

We need them separately because the same pgarchives code is also run standalone, for our private archives. And in that scenario, there is no pgweb involved.

Okay, so let's say if I want to make some changes in https://www.postgresql.org/list/, https://www.postgresql.org/list/pgsql-admin/, https://www.postgresql.org/list/pgsql-admin/2022-06/ etc. In which file should I make changes? main.css of pgweb or pgarchives or both (since pgarchives can also run standalone)? 

Annoyingly enough, both. 

--

pgsql-www by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: can not download mbox
Next
From: Jacob Champion
Date:
Subject: CFM permissions for 2022-07