0

"dungerous" Django Page [solved]

Today I start to learn Django. I create a project on replit.com. I add this code in views.py: def styles(request): stylef = open("style.css") style = stylef.read() return HttpResponse("<style> %s </style> <p> test </p>" % style) This is style.css: p{ color: red; } After that, I open djangotest.kindcat.repl.co. On the main page, I see "Hello World." It's OK. But when I open djangotest.kindcat.repl.co/css, Google Chrome writes: "Beware, a fake website! Visiting the djangotest.kindcat.repl.co website may lead to the installation of malware or theft of personal information (for example, passwords, phone numbers and bank card data). More detailed…" In "more detailed": "The "Google Safe Browsing" function recently detected a phishing attempt on the djangotest.kindcat.repl.co website. Be careful! Scammers often create web pages similar to sites you are familiar with. Report an infected site. If you are ready to put your personal data at risk, you can go to the page." I open other pages. There are OK.

12th Aug 2021, 12:22 PM
Kind_Cat
Kind_Cat - avatar
3 Réponses
0
Thank you. But style.css and views.py are at the same directory., ✩✮★✮✩
12th Aug 2021, 1:35 PM
Kind_Cat
Kind_Cat - avatar
0
Hmmm, I will test it
12th Aug 2021, 2:29 PM
Kind_Cat
Kind_Cat - avatar
0
Thank you!
12th Aug 2021, 2:31 PM
Kind_Cat
Kind_Cat - avatar