Skip to content

2.0.0 - Update extension

Compare
Choose a tag to compare
@marcuxyz marcuxyz released this 01 Nov 03:07
· 28 commits to main since this release
a4cce15

This verion contain break change:

  • Now the routes are be registered using .py file.
  • To standardize the application the mvc_flask extension just work with app directory
  • You can register routes based in methods: GET, POST, UPDATE and DELETE
  • we no longer support to routes.json file.

To register routes you can use the routes.py inside app directory and the file must contain the import Router object, The Router object must be used to register the routes. You can use GET, POST, UPDATE and DELETE methods to register routes. E.g:

from mvc_flask import Router

Router.get("/", "home#index")
Router.get("/hello", "home#hello")
Router.post("/messages", "messages#create")
Router.put("/users/<id>", "users#update")
Router.delete("/users/<id>", "users#delete")