Django-ninja-crud

Latest version: v0.4.1

Safety actively analyzes 622315 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.4.1

**Date:** November 29, 2023

In this release, we focus on enriching the developer experience with comprehensive documentation for every class and a major shift in how you access and interact with our guides. Version `v0.4.1` may not be feature-heavy, but it marks a pivotal point in our project's maturity – establishing itself as a reference version with detailed docstrings across the board. We're also thrilled to announce our migration from GitHub Wiki to readme.io for our documentation hosting. This move unlocks versioned documentation, a sleek interface, and forthcoming advanced guides and recipes that leverage the full potential of readme.io's features.

📚 Documentation and Guides

- **Complete Class Documentation**:
Every class, from views to testing components, is now meticulously documented, providing clarity and a solid foundation for best practices (309, 311, 332).

- **Migration to readme.io**:
Transitioned from GitHub Wiki to readme.io for documentation hosting, introducing versioning and improved aesthetics for our documentation (315, 321).

✨ New Features

- **Support for Django Ninja `v1.0`**:
We've added support for the latest version of Django Ninja, ensuring compatibility and cutting-edge functionality (291).

- **Enhanced Property Support**:
New property support and type checks have been introduced for testing components, expanding our framework's versatility (307).

- **Flexible Base Path Configuration**:
`base_path` now gracefully handles leading or trailing slashes, simplifying endpoint definition (327).

⚙️ Continuous Integration & Workflows

- **Testing Across Versions**:
Extended our test suite to include Django `5.0b1` and Python `3.12`, staying ahead with the latest tech stack (293, 297).

- **Workflow Enhancements**:
Improved CI workflows for tests, coverage reporting, and harmonization with Python `3.12` (298, 300).

🔧 Chores and Refinements

- **Configuration Adjustments**:
Streamlined pre-commit settings and updated `requirements` in our README and guides for a smoother setup experience (295, 302).

⚒️ Refactoring

- **Consolidated Request Handling**:
Refactored `perform_request` logic into `AbstractModelViewTest` for enhanced clarity and maintainability (328).

- **Streamlined Testing Framework**:
Removed `TestAssertionHelper` class to consolidate our testing approach, making it more intuitive and straightforward (330).

- **Refined ModelView Configuration**:
Moved `configure_route` to `AbstractModelView` for better encapsulation and easier route customization (324).

**Full Changelog**: [View the complete list of changes](https://github.com/hbakri/django-ninja-crud/compare/v0.4.0...v0.4.1)

0.4.0

**Date:** November 5, 2023

🎉 New Features

- **Default Schema Definitions for ModelViewSet**:
Introduced `default_input_schema` and `default_output_schema` at `ModelViewSet` level to simplify schema management across CRUD operations (261).

- **New BaseModelViewSet Class**:
A new `BaseModelViewSet` class has been added to reduce redundancy and promote consistency in CRUD operations (263).

- **Support for Django Ninja v1.0b2**:
Ensured full support for Django Ninja `v1.0 beta 2`, integrating the latest features and improvements (277).

💥 Breaking Changes & Migration Guides

- **Refactoring of Testing Module**:
The `testing` module has undergone significant refactoring. Please follow the detailed migration guide to adapt your code to these changes (272).

- **Reorganization of ViewSets and Views**:
`views` and `viewsets` modules have been restructured for improved clarity. Update your imports following the instructions provided below (274).

- **Class Attribute Renaming**:
`model_class` has been renamed to `model`, and `model_view_set_class` to `model_viewset_class`. Please see the migration guide for the necessary changes (284, 279).

- **Deprecation of Python 3.7 Support**:
Python 3.7 support has been deprecated as part of our ongoing commitment to maintain the package up-to-date with current best practices (275).

🔧 Chores

- **Pre-commit Linting with Ruff**:
Integrated `ruff` into the pre-commit configuration for improved linting processes (275).

⚒️ Refactoring

- **Validation in ModelViewSet Initialization**:
Validation logic in `ModelViewSet` has been moved into the `__init_subclass__` method to enhance subclassing mechanics (264).

- **Removal of PartialUpdateModelView**:
`PartialUpdateModelView` has been removed to advocate for explicit view configurations, aligning with explicitness over implicitness principles (270).

👨‍🎨 Migration Guides

For the Testing Module Refactor:
- Adjust your imports according to the new module structure and naming conventions detailed in the summary of changes above (272).

For Views and ViewSets Module Reorganization:
- Update your `ModelViewSet` imports from `ninja_crud.views` to `ninja_crud.viewsets` as outlined in the provided migration steps (274).

For Class Attribute Renaming:
- In all subclass definitions of `ModelViewSet` and `ModelViewSetTestCase`, replace `model_class` with `model` and `model_view_set_class` with `model_viewset_class`, respectively, as directed in the migration guide.

We understand these updates may require you to make changes to your codebase. We're here to help guide you through this transition, so please reach out if you need further assistance or clarification.

0.3.3

**Date:** October 13, 2023

✨ New Features

- **Pagination Control**: Added option to `disable` or `override` the default `LimitOffsetPagination` class (254).

📚 Documentation

- **Type Hint Corrections**: Corrected `Optional` type hints in `docstrings` for accuracy and clarity (256).

0.3.2

**Date:** October 8, 2023

✨ New Features

- **Router Parameters Override**: added support for overriding `summary`, `operation_id` and most importantly `path` (236, 241).

🛠 Refactoring

- **Test Framework**: moved `HTTPStatus` checks into `RequestComposer` class and renamed `RequestComposer` to `TestComposer` (232, 234).
- **Abstract Model View**: generalized `method`, `path` and `detail` attributes to `AbstractModelView` (241, 247).

🏄‍♂️ Code Quality

- **PEP 484**: made `Optional` type hints `explicit` according to PEP 484 (243).

0.3.1

**Date:** September 5, 2023

🛠 Refactoring

- **Rename Test Classes**: All test classes have been renamed to follow Python unittest conventions by having "Test" as a prefix. This change comes with deprecation warnings for the old class names (222).

🐛 Bug Fixes

- **TestModelViewSetMeta Error Message**: Improved the error message in `TestModelViewSetMeta` to be more informative when the class is not subclassed from `TestCase` (228).

📚 Documentation

- **Contribution Guidelines**: Updated `CONTRIBUTION.md` to provide better clarity for potential contributors (217).
- **README and Examples**: Updated `README.md` and `04-Examples.md` for the `v0.3.1` release, including new changes (226).

---

📣 Note
This is a minor release that includes important refactoring. Existing users are encouraged to update to this version for a smoother development experience. Note that the test class renaming includes deprecation warnings for the old class names, so it's important to transition to the new naming convention.

0.3.0.post1

**Date:** August 24, 2023

📚 Documentation

- **README Logo on PyPI**: Fixed the relative path to the project logo in the README to ensure it displays correctly on PyPI (196).

---

📣 Note
This is a non-functional change and does not affect the library's behavior or performance. Existing users do not need to update unless they specifically wish to see the corrected documentation on PyPI.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.