Skip to content

Releases: marcuxyz/mvc-flask

v2.11.1

02 Nov 22:35
9d99a56
Compare
Choose a tag to compare

What's Changed

  • chore(test.yml): Update Python versions for Github Actions by @marcuxyz in #68
  • chore(deps): bump werkzeug from 3.0.1 to 3.0.6 by @dependabot in #69

Full Changelog: v2.11.0...v2.11.1

v2.11.0

21 Jul 17:44
9bbd5a6
Compare
Choose a tag to compare

What's Changed

  • chore(pyproject.toml): Update splinter version to "^0.19.0" by @marcuxyz in #67

Full Changelog: v2.10.0...v2.11.0

v2.10.0

21 Jul 17:37
78cbe53
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2.9.0...v2.10.0

v.2.9.0

29 Nov 01:30
567248c
Compare
Choose a tag to compare

What's Changed

  • Create support for calling callbacks on specific actions by @marcuxyz in #56

Previously you could only run callbacks for all routes. For example,

Before:

from flask import render_template

before_request = ["set_user"]

def index(self):
    return render_template('users/index.html', user=self.user)

def show(self):
    return render_template('users/show.html', user=self.user)

def set_user(self):
    self.user = 'Joe'

To both routes index and show you can call self.user.

Now, you can use dict structure to control the before_request callback.

before_request = dict(callback="set_user", actions="show")

See:

from flask import render_template

before_request = dict(callback="set_user", actions="show")

def index(self): 
    # self.user is not implemented here
    return render_template('users/index.html')

def show(self):
    return render_template('users/show.html', user=self.user)

def set_user(self):
    self.user = 'Joe'

Now you can invoke the callback only on the action of your choice

Full Changelog: v2.8.3...v2.9.0

v2.8.3

20 Nov 19:29
a4ef4ff
Compare
Choose a tag to compare

What's Changed

  • Refactor main code, separate code into modules by @marcuxyz in #55

Full Changelog: v2.8.2...v2.8.3

v2.8.2

17 Nov 03:27
adf7482
Compare
Choose a tag to compare

What's Changed

  • Improve code readability and maintainability in FlaskMVC class and Hook class by @marcuxyz in #52
  • bump version from 2.8.1 to 2.8.2 in version.py, pyproject.toml, and version_test.py by @marcuxyz in #53

Full Changelog: v2.8.1...v2.8.2

v2.8.1

14 Nov 17:52
fba5dd0
Compare
Choose a tag to compare

What's Changed

  • Implement method tag for creating input hidden with PUT or DELETE value by @marcuxyz in #48

Full Changelog: v2.7.2...v2.8.1

v2.7.2

12 Nov 18:41
50b28e3
Compare
Choose a tag to compare

What's Changed

  • chore(pyproject.toml): update Flask to 3.0.0 by @marcuxyz in #46

Full Changelog: v2.7.1...v2.7.2

v2.7.1

12 Nov 18:21
d1262ef
Compare
Choose a tag to compare

What's Changed

  • Create a documentation for MVC-Flask by @marcuxyz in #39
  • Refactor the code, create documentation to code, and update tests by @marcuxyz in #43

Description

Test Improvements and Refactoring:
New test cases were added to validate the registration of blueprints, routes, endpoints, and HTTP verbs​​.
The tests in routes_test.py were refactored for better readability and maintainability. This included removing unused properties and simplifying tests by directly comparing expected and actual blueprints, routes, and methods​​.

Version Update and Tests:
The package version was updated from 2.5.0 to 2.7.0, with a corresponding unit test added to verify this change​​.

Test Setup and File Management:
A conftest.py file was added for test fixtures and client setup, replacing the fixtures.py file. Additionally, the messages_endpoint_test.py file was added for testing message endpoints, while the request_test.py file was removed​​.

Makefile and Dependency Updates:
The Makefile was updated to use pytest instead of ward and to change the line length limit to 89 characters for consistency. Flask-SQLAlchemy and pytest were added as dev dependencies​​.

Router Class Addition:
A Router class was added to manage different HTTP routes (GET, POST, PUT, DELETE) for the application's controllers and actions​​.

Additional Test Cases and Cleanup:
New tests were added for checking blueprints registration, message routes, and endpoints. Unnecessary blank lines were removed to improve code readability. Tests were also added to ensure proper registration of routes and methods count​​​​​​.

HTTP Method Override Functionality:
The http_method_override.py file was added to handle HTTP method override functionality with new HTTPMethodOverrideMiddleware and CustomRequest classes​​.

Controller and Route Management:
The messages_controller.py was refactored to handle both JSON and form data for updating message titles. Unused methods and files in the controllers were removed, and new methods were added to improve code organization and readability​​​​.

Full Changelog: v2.7.0...v2.7.1

v2.7.0

09 Nov 19:52
2fc33e9
Compare
Choose a tag to compare

What's Changed

  • Implement HTTP Method Override Middleware by @marcuxyz in #34

Full Changelog: v2.6.2...v2.7.0