Add universal response for your API
Project description
Library for django rest framework
Repository: https://bitbucket.org/anmv/universal-response-mobile-api
PIP package: https://pypi.org/project/universal-response-mobile-api/
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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e19013f5035a1408f2c55fbf757b0f88087e03d4281ab8f35f713446de86887a |
|
MD5 | b2ddce4652b74b744330667be840db15 |
|
BLAKE2b-256 | 0bc8519e672893017ab7a1e0079395724ca0f0fc6af7c119e232ac0eb88dba71 |
Close
Hashes for universal_response_mobile_api-0.1.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c031a87fcc049d15343fbd802d711ef51264c96ce2519619f87a74d591da21d9 |
|
MD5 | e457ee6e804fb5cdf172581da89a2b1f |
|
BLAKE2b-256 | ae91099ac4fb723765818a2404f43b1be82fc992f5015b0395831ca8e4531306 |