Re: Queries regarding staticfiles | pgarchives
От | Magnus Hagander |
---|---|
Тема | Re: Queries regarding staticfiles | pgarchives |
Дата | |
Msg-id | CABUevEyc6ixWpzjUZcrabov6w+Hh8Qzj+P=y-1u_cdn+aVe+-Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Queries regarding staticfiles | pgarchives (Sahil Harpal <sahilharpal1234@gmail.com>) |
Ответы |
Re: Queries regarding staticfiles | pgarchives
|
Список | pgsql-www |
On Wed, Jun 15, 2022 at 5:38 AM Sahil Harpal <sahilharpal1234@gmail.com> wrote:
On Wed, 15 Jun 2022 at 02:52, Magnus Hagander <magnus@hagander.net> wrote:As I said, you need to make the folder /media/ be served up as /media-static/. This is configuration in your webserver.Could you please help me to do this? Like where and what I need to change.
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/;
}
alias /some/where/pgarchives/django/media/;
}
Um. There is no reference from https://www.postgresql.org/list/ to main.css in media-archives that I can see?Yeah, with the help of /dyncss/ the base.css = (main.css+normalize.css) of pgweb gets loaded after visiting /list/.
Now I am just confused about what exactly happens when someone opens https://www.postgresql.org/list/ in the browser? How is HTML loading? If it is using CSS files of pgweb then why do we have CSS files in the /media/css/ of pgarchives :(
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.
В списке pgsql-www по дате отправления: