from . import views
from django.urls import path,re_path
from . import views
urlpatterns = [
path('v2/sendSms', views.SendSmsAPIView.as_view(), name='sendSms'),
path('v2/sendSmsPa', views.SendSmsPaAPIView.as_view(), name='sendSmsPa'),
path('v2/batchReport', views.BatchReportView.as_view(), name='batchReport'),
path('Accounts/abcde/SMS/GetArrived', views.GetArrivedView.as_view(), name='GetArrived'),
re_path(r'^(?P<account_pk>\d+)/Accounts/(?P<template_pk>\d+)/SMS/TemplateSMS$', views.TemplateSMSView.as_view(),
name='template_sms'),
]
class TemplateSMSView(APIView):
def post(self,request,account_pk,template_pk):
data = {
'account_pk': account_pk,
'template_pk': template_pk,
}
return Response(data,status=200)
标签:name,views,url,参数,template,pk,path,view,drf
From: https://www.cnblogs.com/xchuan/p/18290004