16 lines
512 B
Python
16 lines
512 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:
|
|
param = request.POST.get("param")
|
|
title = m_api.SysConfig.objects.filter(identity=param).first().param
|
|
return HttpResponse(title)
|
|
except Exception as e:
|
|
print(f"报错了:{e}")
|
|
return HttpResponse("报错了")
|