Open AliyahZafar opened 10 years ago
Problem in installing Window's 8... Bit problems in understanding route , template thing
@route('/hello') >>> is /hello is a folder ??? createrd by route that will bind /hello folder to the hello() function ?
Request Routing??
Don't worry about installation, will do that in Linux. Bottle is just one single python file which can be placed in project folder so installation is not even required
In routing there are no folders involved, unlike normal php where a URL is mapped to a PHP file, in frameworks urls are mapped to functions. Meaning a function is executed when a URL is accessed by the client. So
@route('/hello')
def myfunc( ):
return "hello world"
Means when user accesses the /hello URL then execute function myfunc which just returns the string "hello world" and that is displayed in the browser.
This as explained above is request routing. Simply request routing is linking code/functions to URLs
I didn't get the arguments passsing n request routing example that was bit weird :/ ... Plus i've seen bootstrap n applied few things
Website:
Tutorial: