Skip to content
/ ct-rest Public

在Django中实现符合天翼云规范的REST框架

Notifications You must be signed in to change notification settings

ctyun/ct-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

INSTALL

pip install ct_rest

USE

from ct_rest.wrapper import REST

#at view.py
@REST(method="GET",
      header=["crm_id"])
def testdb(request):
    accounts = AccountCrm.objects.all()
    que = Q(crm_id = "01cb72f9e07a4cbc813880efde8afd89") | Q(crm_id="035c243ebf12483eb498c9d8295cc476") | Q(crm_id__contains="00")
    accounts = AccountCrm.objects.filter(que)
    result = []
    for ins in accounts:
        result.append(ins.crm_id+"\n")
    return result

About

在Django中实现符合天翼云规范的REST框架

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages