DIY Django's JsonResponse and JsonpResponse
Project description
django-json-response
JsonResponse is New in Django 1.7 Ref: https://docs.djangoproject.com/en/1.8/ref/request-response/#jsonresponse-objects
Installation
pip install django-excel-response2
Usage
from excel_response2 import ExcelResponse def excelview(request): objs = SomeModel.objects.all() return ExcelResponse(objs)
or:
from excel_response2 import ExcelResponse def excelview(request): data = [ ['Column 1', 'Column 2'], [1, 2], [3, 4] ] return ExcelResponse(data, 'my_data', font='name SimSum')
Params
- font=’name SimSum’
Set Font as SimSum(宋体)
- force_csv=True
CSV Format? True for Yes, False for No, Default is False
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 django-json-response-1.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 317e063eeacdde984e0facb8517c1baa9e79724a55380a92180e096ea7c0b819 |
|
MD5 | 667e6c420c7e99b659362dbb6cf2e02a |
|
BLAKE2b-256 | 6f6f58784afe63dc5d041984e854aa94edf72ab58572b1bdc5b712d84bd02b8e |
Close
Hashes for django_json_response-1.0.5-py2.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e596ec8ed6475b617138bcf9052c7b7c05a87d2565860c7d98799ed98ed1d3b |
|
MD5 | fadc0484fcca3d05051bdecc8b6c2155 |
|
BLAKE2b-256 | 3d4e77e43e5984136ddc7fda96b1dd8b7a88ac7a80c0ffe4cadff298ccc8defa |