Django-url-framework

Latest version: v0.6.0

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

Scan your dependencies

0.5.3

Functionality change `_before_filter`
- When returning a `dict` from `_before_filter`, it would previously overwrite the `dict` returned from the actions themselves.
New functionality is that dict keys returned by an action will overwrite dict keys returned by the `_before_filter`.
- Default `JSONEncoder` is set to `DjangoJSONEncoder`.
- Removed dependency on `simplejson`.

0.5.2

Bugfix
- Using `json_action()` or `yaml_action()` would crash if the action returns an HttpResponse and not serializable data.

0.5.0

Added
- auto() decorator, will render your `action` response based on the HTTP Accept header
- json_action(json_encoder=None) decorator, will render all `action` returns as JSON
- yaml_action(default_flow_style=None) decorator, will render all `action` returns as YaML
- Site.autodiscover() now accepts `new_inflection_library` parameter, if True, controller names will be translated into URLs using the `inflection` library
- Decorators can now be imported directly from `django_url_framework.decorators`
- `use_inflection_library` for `ActionController`, if set to `None`, allows the `Site` to control it, oterwise the controller can override the `Site` setting.
- `yaml_default_flow_style` - If you want collections to be always serialized in the block style, set to False
- `json_default_encoder` - Set your custom JSONEncoder class
- Return a 2 item tuple from any `action` with the second item being the desired status code. *Warning: Potentially breaking change*

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.