Apr-04-2017, 12:46 AM
a friend showed me how he was setting up web pages in flask. one thing about how this was done bothered me. every time he added a new page, in addition to adding the file for it in the file system he added a path for it in another place (that was specific to flask). i asked what would happen if did not add that path. he said it would get a 404 (file not found) error. this does not follow one of the principles i use in all my programming and system/network administration. that is that each thing that is configured should be in one place. the idea is that it is not necessary to keep different things in sync. does flask really need to work that way? if it does, is there an alternative? i have built a couple web sites in which web page files (including CGI) would come and go as needed (various processes would add, delete, or replace them.
at the time i wanted to use python (instead of C) to put together a web site for a major client. so i put together my own web server in python to do it. the site was internal, only, so high performance and security were not issues. it all ran under one single system user (all files were readable by that user). new pages could be added just by adding the file ... a python script (because this was all about a database or administration data for then hosts it ran on) which was a module import-loaded file with a specific function (named handle_http_request).
what does WSGI impose for this?
at the time i wanted to use python (instead of C) to put together a web site for a major client. so i put together my own web server in python to do it. the site was internal, only, so high performance and security were not issues. it all ran under one single system user (all files were readable by that user). new pages could be added just by adding the file ... a python script (because this was all about a database or administration data for then hosts it ran on) which was a module import-loaded file with a specific function (named handle_http_request).
what does WSGI impose for this?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.