Re: Queries regarding staticfiles | pgarchives

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Queries regarding staticfiles | pgarchives
Дата
Msg-id CABUevEzt2UuckA2i9JPrEyAFn-H58OOY4e_qe9GbvK_WXrxsLA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Queries regarding staticfiles | pgarchives  (Sahil Harpal <sahilharpal1234@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: can not download mbox
Следующее
От: Jacob Champion
Дата:
Сообщение: CFM permissions for 2022-07