Closed arpit456jain closed 3 years ago
@SaiSudhaV @PROTechThor @sruti2024 kindly review this PR
@arpit456jain Is External CSS creating a bug?
@arpit456jain Is External CSS creating a bug?
Yes... when debug is false django doesn't render css locally
So it's good practice to keep css for 404 page in it . No need to make a separate css file
@SaiSudhaV some times its good to be internal css rather than external 🙂.
@sruti2024 kindly merge this PR and add labels to it
@arpit456jain Is External CSS creating a bug?
Nope, because when you SET DEBUG=False,
Django doesn't load static files for this we have to use the --insecure
flag while running server. ie python manage.py runserver --insecure
See this Stackoverflow Question: https://stackoverflow.com/questions/31097333/why-is-serving-static-files-insecure
@arpit456jain I think this is not a bug if you follow the above instructions, you see 404.html load with external CSS
Note: In the future, if project admin wants to deploy this app, they could use collectstatic which ensures all static files load properly.
See I've tested locally : :point_down:
@Aryamanz29 First thing are you mentor ? ?
Second thing . I dont't know about --insecure if its true then may be you are right..
Third what's the big deal if we put css internally ?
Fourth main purpose of creating external css is to reduce code , the css which is being used in more than one page is preferred to put externally . No need of making all css external it slow down the loading capacity of page .
@SaiSudhaV @sruti2024 if you think this PR is good yo be merged , please merged it . or you can close it no problem to me . thank You
@Aryamanz29 First thing are you mentor ? ?
Second thing . I dont't know about --insecure if its true then may be you are right..
Third what's the big deal if we put css internally ?
Fourth main purpose of creating external css is to reduce code , the css which is being used in more than one page is preferred to put externally . No need of making all css external it slow down the loading capacity of page .
@SaiSudhaV @sruti2024 if you think this PR is good yo be merged , please merged it . or you can close it no problem to me . thank You
Ans 1. I'm not a mentor, and in open source, anyone can discuss and put their opinion
Ans 2. I have already commented in setting.py about --insecure
and 404 custom page
.
Ans3. Code is not maintainable if we have internal css, and it's indigestible for new contributors. Everyone should follow similar code writing practices and maintain modularity.
Ans4. Yes, but also external static files are cached, which makes the page smooth and quicker.
@SaiSudhaV @sruti2024 can you add labels please
@SaiSudhaV @sruti2024 @PROTechThor labels ??
Description:
fixed a bug in 404 page previously
now
Fixes #202
Type of change:
Checklist:
Screenshots / Video: