Re: Queries regarding staticfiles | pgarchives
От | Magnus Hagander |
---|---|
Тема | Re: Queries regarding staticfiles | pgarchives |
Дата | |
Msg-id | CABUevEy4V1oNfnAL74sdk3tNpGu5cz+e855PKdU-Mm+cAz+9kg@mail.gmail.com обсуждение исходный текст |
Ответ на | Queries regarding staticfiles | pgarchives (Sahil Harpal <sahilharpal1234@gmail.com>) |
Ответы |
Re: Queries regarding staticfiles | pgarchives
|
Список | pgsql-www |
On Tue, Jun 14, 2022 at 2:43 PM Sahil Harpal <sahilharpal1234@gmail.com> wrote:
Hello,I have following queries related to staticfiles:
- Why do we have /media-archives/... URL for CSS files? [https://github.com/postgres/pgarchives/blob/master/django/archives/mailarchives/templates/base.html#L18] Such folder is not present in the project. We have a folder named media which contains all static files. Can I change all /media-archives/ to /media/ ? Also the css_map that dynamic_css() method is using and in the css files for specifying path to images, contain /media/ and not /media-archives/.
Because it runs on the same hostname as www.postgresql.org, and otherwise there would be a potential conflict. The folder /media/ is in the filesystem, and should be served up as /media-static/ on http.
- What is the use case of that dynamic_css() method?
It is to reduce the number of files in a quick and hacky way. We had too many different CSS files and this is one way to serve them up under a single URL to make things faster.
- CSS and images will reflect on the HTML pages when I set STATIC_URL = "/media/" and change all media-archives to media. Also I need to add 'django.contrib.staticfiles' in the INSTALLED_APPS.
We don't use staticfiles.
- In the main.css also many things are missing.
I have attached the main.css present in the GitHub and main.css that actual pgarchives is using. Why do we have such differences in the code?
What do you mean "present in the github" and the one that's in pgarchives? Where is it on github and where do you see it in pgarchives?
В списке pgsql-www по дате отправления: