Skip to content

Releases: AghastyGD/lazy-ninja

v0.4.0

10 Mar 20:33
14b3af0

Choose a tag to compare

Release Notes for Version 0.4.0

New Features

  • controller_for decorator: Introduced a new decorator controller_for in registry.py to automatically register a controller for a model. This simplifies the creation and registration of custom controllers, making it easier for developers to implement custom hooks.
  • Kebab-Case Conversion Utility: Added a new utility function to_kebab_case in helpers.py that converts strings from various formats (CamelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE) to kebab-case. This is useful for URL handling.
  • Pagination and Filtering Functionality:
    • Implemented pagination and filtering (sort and order) in the routes.
    • Created custom functions for handling pagination and filters.
    • Organized the code by introducing a new module pagination.py and enhancing helpers.py.
    • Enabled selection of the pagination type via the pagination_type parameter or the NINJA_PAGINATION_CLASS setting.
    • Leveraged page limit configuration using the NINJA_PAGINATION_PER_PAGE setting.

Improvements

  • Module Import Handling: Added new discover_controllers method in registry.py to improve module import handling. This ensures that all controller modules are correctly imported and registered.

Documentation

  • Updated Documentation: Updated the README to reflect the new controller_for decorator. Added examples and usage instructions for the new feature

Tests

  • Unit tests for kebab-case: Added unit tests for the to_kebab_case function to ensure correct conversion from various string formats to kebab-case.
  • Manually tested the controller_for decorator and pagination and filters feature to ensure proper integration and behavior.

Breaking Changes

  • None

How to Upgrade

  1. Update your project dependencies to include the new version of Lazy Ninja.
  2. Review the updated documentation to understand the new controller_for decorator and how to use it for custom controllers.
  3. Run the new unit tests to ensure that your project is compatible with the new version.

v0.3.1 - Release

01 Mar 16:42

Choose a tag to compare

What's Changed

  • Fix python code in the readme by @sobolevn in #12
  • hotfix: Add foreign key conversion in update route by @AghastyGD in #13
  • feat: update to version 0.3.0 with new features, fixes, and Pydantic v2 compatibility by @AghastyGD in #14
  • Dev by @AghastyGD in #15

New Contributors

Full Changelog: v0.2.0...v0.3.1

v0.2.0 - Release

22 Feb 20:56

Choose a tag to compare

Promoting the pre-release 0.2.0a1 to a more stable release. In this version, were fixed several bugs and implemented improvements that were already tested during the alpha phase.

Key Changes:

  • Fixed bugs identified during alpha testing.
  • Enhanced documentation and incorporated user feedback.
  • Adjusted the API for greater consistency.

v0.2.0a1 - Pre-release (Alpha)

22 Feb 19:48
5e16eb6

Choose a tag to compare

Pre-release

What's Changed

  • Fix: Prevent registration of routes for models not present in the Database by @AghastyGD in #7
  • Update Readme by @AghastyGD in #8
  • Fix: Resolve validation errors on listing/creating models with ImageField, DateTimeField, and ForeignKey by @AghastyGD in #10

New Contributors

Full Changelog: https://github.com/AghastyGD/lazy-ninja/commits/v0.2.0a1