Add universal response for your API
Project description
Library for django rest framework
Install
pip install universal-response-mobile-api
Use
import universal_response_mobile_api as u_mobile_api
1. Decorator
Add your Django project, for default behavior:
file: settings.py
import universal_response_mobile_api as u_mobile_api
'DEFAULT_RENDERER_CLASSES': (
'u_mobile_api.StructuredJsonRenderer',
),
or use as decorator for rest-api.
2. Errors handler
Add your Django project:
file: settings.py
import universal_response_mobile_api as u_mobile_api
REST_FRAMEWORK = {
...
'EXCEPTION_HANDLER': 'u_mobile_api.custom_exception_handler',
...
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for universal_response_mobile_api-0.1.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf7cb9d769d86160ef50fda17a59087656b3871c8f296e52799689d697b4c19 |
|
MD5 | d7a1788ad40ca43112df079d43002d56 |
|
BLAKE2b-256 | 9da1058c1251e7b7bc4675a5b02381afa9a1cf2c99efa7bc267802f28e7651c0 |
Close
Hashes for universal_response_mobile_api-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c22164f6f64368c86a7342e11d981965bb152492ce7634cb9973e38e806388b |
|
MD5 | 5f765799688d2bc50be6568f4ed8fb8e |
|
BLAKE2b-256 | 733b2e5867e9d0cde1aa57ce83186ec13b086898d355bbc181d69f22f659241e |