{"id":1435,"date":"2023-05-21T08:19:24","date_gmt":"2023-05-21T08:19:24","guid":{"rendered":"https:\/\/itnotes.apjsoftwares.com\/?p=1435"},"modified":"2023-05-21T08:19:24","modified_gmt":"2023-05-21T08:19:24","slug":"is-flask-an-mvc-model-and-if-yes-give-an-example-showing-mvc-pattern-for-your-application","status":"publish","type":"post","link":"https:\/\/itnotes.apjsoftwares.in\/index.php\/2023\/05\/21\/is-flask-an-mvc-model-and-if-yes-give-an-example-showing-mvc-pattern-for-your-application\/","title":{"rendered":"Is Flask an MVC model, and if yes give an example showing MVC pattern for your application?"},"content":{"rendered":"\n<p>Basically, Flask is a minimalistic framework that behaves same as MVC framework. So MVC is a perfect fit for Flask, and the pattern for MVC we will consider for the following example<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>from flask import Flaskapp = Flask(_name_) @app.route(&#8220;\/&#8221;) Def hello(): return &#8220;Hello World&#8221; app.run(debug = True)<\/td><td>In this code your, Configuration part will be from flask import Flask<br><code>app = Flask(_name_)<\/code><br>View part will be@app.route(&#8220;\/&#8221;) Def hello(): return &#8220;Hello World&#8221; While you model or main part will be<br><code>app.run(debug = True)<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Basically, Flask is a minimalistic framework that behaves same as MVC framework. So MVC is&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1435"}],"collection":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/comments?post=1435"}],"version-history":[{"count":1,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1435\/revisions"}],"predecessor-version":[{"id":1436,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1435\/revisions\/1436"}],"wp:attachment":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/media?parent=1435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/categories?post=1435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/tags?post=1435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}