|
@@ -1,5 +1,6 @@
|
|
|
import json
|
|
|
|
|
|
+from django.db.models import F
|
|
|
from django.http import QueryDict
|
|
|
from django.views import View
|
|
|
from Ansjer.config import LOGGER
|
|
@@ -47,9 +48,10 @@ class APNConfigView(View):
|
|
|
return response.json(444)
|
|
|
|
|
|
# 查询数据库,获取与国家代码匹配的 APN 配置信息
|
|
|
- country_apn_qs = CountryAPN.objects.filter(iso=country_code).values(
|
|
|
- 'apn_name', 'apn_address', 'username', 'password', 'auth_type'
|
|
|
- )
|
|
|
+ country_apn_qs = CountryAPN.objects.filter(iso=country_code).values('username', 'password',
|
|
|
+ apnName=F('apn_name'),
|
|
|
+ apnAddress=F('apn_address'),
|
|
|
+ authType=F('auth_type'))
|
|
|
|
|
|
return response.json(0, list(country_apn_qs))
|
|
|
|
|
@@ -74,10 +76,3 @@ class APNConfigView(View):
|
|
|
} for country in countries]
|
|
|
|
|
|
return response.json(0, country_iso_list)
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|