Get and Post Methods

     

  • GET: Form values are appended to URL, which is insecure
  •  

     

    render_template

     

  • render_template by default search in "template" Folder
  •  

    static files

     

  • Static files will be placed in the folder of "static"
  •  

  • CSS, Javascript,images will be placed in static folder
  •  

    Insert the values into Table

     

  • We can insert the values into table after updating the data in FORM
  •  

  • FORM will be created in two ways
  •  

    (i) Writing the code in Python file itself
    (ii) Create seperate HTML file and call through render_template method

     

     

    default port

     

  • Default route decorator is http://127.0.0.1:5000/
  •  

    route decorator

     

  • Route decorator denotes about the URL that triggers the function
  •  

     

    render template

     

     

     

    route decorator

     

     

     

    variables in HTML file

     

  • variables placed between brackets {{variable Name}}
  • Variable from a List:

  • {{Listname[1]}}
  • One denotes about slicing

     

     

    Variable from a Dictionary:

  • {{dict[key]}}
  • {{dict[value]}}

     

     

     

    url_for

     

  • url_for() function builds the URL to a specific function
  •  

     

    CSS Style sheet

     

  • It is saved in STATIC folder
  •  

     

     

    desing the templates

     

  • {% extends}