def descriptor(request):
if request.method == 'GET':
app_name = request.resolver_match.app_name
if not app_name:
raise Exception('you must include the dach.urls with the app_name')
descritor_tpl = DACH_CONFIG['appconfig'][app_name].get('descriptor',
'{}/atlassian-connect.json'.format(app_name))
return render(request, descritor_tpl, content_type='application/json')
return HttpResponseNotAllowed(['get'])
评论列表
文章目录