Python Forum
Problem rendering file .css? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Problem rendering file .css? (/thread-21712.html)



Problem rendering file .css? - JohnnyCoffee - Oct-11-2019

I was able to embed inside a python function html5 tags, but I could not style with css the page in the browser? Accessing the source code from the browser and clicking the .css file link and can't find the path and read the .css file ?

Follow the directory :

/
file.css
index.py
server.py


RE: Problem rendering file .css? - snippsat - Oct-11-2019

Are you trying to this without using a web-framework?


RE: Problem rendering file .css? - JohnnyCoffee - Oct-11-2019

(Oct-11-2019, 06:12 PM)snippsat Wrote: Are you trying to this without using a web-framework?

I am developing a Web Framework Mvc in python, where I can already print the html in the browser but I have a path problem to access file.css to style


RE: Problem rendering file .css? - snippsat - Oct-11-2019

(Oct-11-2019, 06:32 PM)JohnnyCoffee Wrote: I am developing a Web Framework Mvc in python, where I can already print the html in the browser but I have a path problem to access file.css to style
when you do this you has to do a lot of study.
At lowest level in WSGI,serving static files and routing with wsgi.

Most look at how other has done it,as they have spend a lot of time on this.
Here werkzeug underlying layer of Flask and bottle as they are a thin layer above WSGI.
The Base Structure werkzeug
ROUTING STATIC FILES Bottle


RE: Problem rendering file .css? - JohnnyCoffee - Oct-11-2019

(Oct-11-2019, 07:29 PM)snippsat Wrote:
(Oct-11-2019, 06:32 PM)JohnnyCoffee Wrote: I am developing a Web Framework Mvc in python, where I can already print the html in the browser but I have a path problem to access file.css to style
when you do this you has to do a lot of study. At lowest level in WSGI,serving static files and routing with wsgi. Most look at how other has done it,as they have spend a lot of time on this. Here werkzeug underlying layer of Flask and bottle as they are a thin layer above WSGI. The Base Structure werkzeug ROUTING STATIC FILES Bottle

Grateful I'll take a look.