Skip to main content

个人工具 用于 django 开发

Project description

Django Json Tools

# http_response_json_models(ser, data, code, msg)    
# 栗子:        
class get_user_info(APIView):            
	user = User.object.get(pk=1)            
	return http_response_json_models(UserSerializer, user, 1, '查询用户信息成功') 

# {'code':1, msg: '查询用户信息成功', data: {'id':1, 'username': 'ingrun'} }
:::

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_json_tools-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

File details

Details for the file django_json_tools-1.0.0.tar.gz.

File metadata

  • Download URL: django_json_tools-1.0.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.6

File hashes

Hashes for django_json_tools-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5b1299baeb6d2cec5929a402281621afe419211d0cf2e84aa47a13b56c42c02d
MD5 846a4d82853fa3a791aeeca448411875
BLAKE2b-256 400d652c4f76441ec7e4c2bbcee9cf19ba41559f93acf801f384231ab2794687

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page