16 lines
518 B
Python
16 lines
518 B
Python
from django.shortcuts import HttpResponse
|
|
from apps.api import models as m_api
|
|
from django.views.decorators.http import require_http_methods, require_POST, require_GET
|
|
|
|
|
|
# Create your views here.
|
|
@require_POST
|
|
def getconfig(request):
|
|
try:
|
|
identity = request.POST.get("param")
|
|
param = m_api.SysConfig.objects.filter(identity=identity).first().param
|
|
return HttpResponse(param)
|
|
except Exception as e:
|
|
print(f"报错了:{e}")
|
|
return HttpResponse("报错了")
|