|
|
|
@ -1,3 +1,4 @@ |
|
|
|
|
|
|
|
from django.core.mail import mail_admins |
|
|
|
import requests |
|
|
|
import requests |
|
|
|
from django.core.cache import cache |
|
|
|
from django.core.cache import cache |
|
|
|
|
|
|
|
|
|
|
|
@ -101,6 +102,7 @@ class AlemTat(object): |
|
|
|
# return tuple(retval) |
|
|
|
# return tuple(retval) |
|
|
|
|
|
|
|
|
|
|
|
def get_amount(self, to, places, weight, service): |
|
|
|
def get_amount(self, to, places, weight, service): |
|
|
|
|
|
|
|
mail_admins('deliv', 'to:{}, places:{}, weight:{}, service:{}'.format(to, places, weight, service)) |
|
|
|
url = self._build_url( |
|
|
|
url = self._build_url( |
|
|
|
'http://api.alemtat.kz/web/{ext}/Calc/getAmount'.format(ext=self.API_KEY)) |
|
|
|
'http://api.alemtat.kz/web/{ext}/Calc/getAmount'.format(ext=self.API_KEY)) |
|
|
|
post_data = dict( |
|
|
|
post_data = dict( |
|
|
|
|