info@mudregu.it 348 799 58 44

Blog Archive

Home
  ›  
Sexsearch online dating
You are here:

A view function may be the code you compose to respond to needs to the application

Flask utilizes habits to suit the incoming request Address to the view which should manage it. The view comes back data that Flask can become a response that is outgoing. Flask also can get one other direction and produce A url up to a view centered on its title and arguments.

Develop a Blueprint

A Blueprint is a real method to prepare a small grouping of relevant views along with other rule. In the place of registering views along with other rule straight with a software, they truly are registered by having a blueprint. Then your blueprint is registered with all the application if it is obtainable in the factory function.

Flaskr may have two blueprints, one for authentication functions and something for your blog posts functions. The rule for every blueprint goes in a split module. Considering that the we blog has to find out about verification, you’ll write the verification one first.

This produces a Blueprint called ‘auth’ . Just like the application item, the blueprint has to understand where it is defined, therefore __name__ is passed away due to the fact second argument. The url_prefix shall be prepended to any or all the URLs linked to the blueprint.

Import and register the blueprint through the factory utilizing app.register_blueprint() .


Categorie

Foto e testi di proprietà di Mudregu, riproduzione concessa solo su permesso. - Site design Mudregu 2014

Go to Appearance -> Menus -> Create your footer menu -> Choose it in "Theme Location" block