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.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d658b45b27ebacc32fe8d754393a74acdc397bc174854bfa03e2a020cacc639 |
|
MD5 | b341f095c39df39ad10be9f17dc63852 |
|
BLAKE2b-256 | f43a9e8e0cab202588971e67dbaeb53b44f7e5808da450b9150d27e21bd4a120 |
Close
Hashes for universal_response_mobile_api-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d9a22543861046537c52f5de8ff941adbf2f950ac968ff582c845667da96dff |
|
MD5 | 6d2fdd451501543236df6f8228b685b9 |
|
BLAKE2b-256 | d09d1fea2a57e640906474345866cfc06e1b9fdd7aa41ebd5d5bbfd58479d88a |