django-chelseru 2.0.1__py3-none-any.whl → 2.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {django_chelseru-2.0.1.dist-info → django_chelseru-2.0.2.dist-info}/METADATA +1 -1
- {django_chelseru-2.0.1.dist-info → django_chelseru-2.0.2.dist-info}/RECORD +6 -6
- drfchelseru/services.py +6 -6
- {django_chelseru-2.0.1.dist-info → django_chelseru-2.0.2.dist-info}/WHEEL +0 -0
- {django_chelseru-2.0.1.dist-info → django_chelseru-2.0.2.dist-info}/licenses/LICENSE +0 -0
- {django_chelseru-2.0.1.dist-info → django_chelseru-2.0.2.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
django_chelseru-2.0.
|
|
1
|
+
django_chelseru-2.0.2.dist-info/licenses/LICENSE,sha256=VupU5KV4NteHaNQb-WH31G_WZWezxXoomjiCIAHoQJo,1089
|
|
2
2
|
drfchelseru/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
drfchelseru/admin.py,sha256=uamcWPCCw9_dD00XL8Brp8A1NvfhB5FtUfF9DWQCK9c,1022
|
|
4
4
|
drfchelseru/apps.py,sha256=hOTTzFGLXiTPZeN8p_LLcSECLtsR2Q0SUo8zJzgM-qQ,211
|
|
@@ -7,7 +7,7 @@ drfchelseru/middlewares.py,sha256=Ej_9GTlVPzfzYAUqxUn7VHJRdlywQmrbSIW43yK5q5U,38
|
|
|
7
7
|
drfchelseru/models.py,sha256=jQ5IbS5q4GufZC9W_zgX1Qg8YU_f8V-Jusbh5hQYPhQ,11214
|
|
8
8
|
drfchelseru/routing.py,sha256=shAlgzcIwVuVPlvKeWBLCqr6PuBTHyIrWNgHEfnqrxg,165
|
|
9
9
|
drfchelseru/serializers.py,sha256=I3kS2NhzIprY8-WWhjQPShAom6R7epg7do7RnDkpnys,1421
|
|
10
|
-
drfchelseru/services.py,sha256=
|
|
10
|
+
drfchelseru/services.py,sha256=K-VzisPliuKv0BL6Z3U6Tz0ewiVwhUkxt7yn08pemCk,29024
|
|
11
11
|
drfchelseru/settings.py,sha256=LhdRLmUJnNlET0JYnHqRdFzmBD_nEX18qU1C1j0qN0E,11466
|
|
12
12
|
drfchelseru/signals.py,sha256=CI1mZR5RrdOddXBnPC1eMdt9iQkYFDypfgogtfTc2eQ,2714
|
|
13
13
|
drfchelseru/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
@@ -37,7 +37,7 @@ drfchelseru/migrations/0020_payment_paid_at.py,sha256=H6cr-tfjJVjN3tCsCD8ecg9JGJ
|
|
|
37
37
|
drfchelseru/migrations/0021_alter_payment_message.py,sha256=g5qIvQ-wecdXGcMf7ZhyfL2u85QpgMUOADHE7t4QHog,397
|
|
38
38
|
drfchelseru/migrations/0022_payment_pay_mode_wallet.py,sha256=241lZITO1jQHqXkJKYm8DKUh7w9rmROh65LzNifP3BA,1521
|
|
39
39
|
drfchelseru/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
|
-
django_chelseru-2.0.
|
|
41
|
-
django_chelseru-2.0.
|
|
42
|
-
django_chelseru-2.0.
|
|
43
|
-
django_chelseru-2.0.
|
|
40
|
+
django_chelseru-2.0.2.dist-info/METADATA,sha256=XpDHKGThjY6g1xxY19GijeYm8hZTWBjjp1yMEM5F3g4,18242
|
|
41
|
+
django_chelseru-2.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
42
|
+
django_chelseru-2.0.2.dist-info/top_level.txt,sha256=fsaO1F03W3j4AYi0TfDGv5Cjb_Qrh6RSkwkWqfqaMns,12
|
|
43
|
+
django_chelseru-2.0.2.dist-info/RECORD,,
|
drfchelseru/services.py
CHANGED
|
@@ -124,22 +124,23 @@ class KavenegarCom:
|
|
|
124
124
|
def send_message_lookup(self, message, template_id, **kwargs):
|
|
125
125
|
try:
|
|
126
126
|
api_url = f'https://api.kavenegar.com/v1/{self.API_KEY}/verify/lookup.json'
|
|
127
|
+
message = ''.join(list(map(lambda x: x if x != ' ' else '-', message.strip())))
|
|
127
128
|
data = {
|
|
128
129
|
'receptor': self.RECEIVER,
|
|
129
130
|
'template': template_id,
|
|
130
|
-
'token': message
|
|
131
|
+
'token': message,
|
|
131
132
|
}
|
|
132
133
|
if kwargs.get('token2'):
|
|
133
|
-
data['token2'] = kwargs.get('token2').strip()
|
|
134
|
+
data['token2'] = ''.join(list(map(lambda x: x if x != ' ' else '-', kwargs.get('token2').strip())))
|
|
134
135
|
|
|
135
136
|
if kwargs.get('token3'):
|
|
136
|
-
data['token3'] = kwargs.get('token3').strip()
|
|
137
|
+
data['token3'] = ''.join(list(map(lambda x: x if x != ' ' else '-', kwargs.get('token3').strip())))
|
|
137
138
|
|
|
138
139
|
if kwargs.get('token10'):
|
|
139
|
-
data['token10'] = kwargs.get('token10')
|
|
140
|
+
data['token10'] = kwargs.get('token10').strip()
|
|
140
141
|
|
|
141
142
|
if kwargs.get('token20'):
|
|
142
|
-
data['token20'] = kwargs.get('token20')
|
|
143
|
+
data['token20'] = kwargs.get('token20').strip()
|
|
143
144
|
|
|
144
145
|
response = requests.post(url=api_url, data=data)
|
|
145
146
|
return response
|
|
@@ -259,7 +260,6 @@ def send_message(mobile_number, message_text, data=None, template_id=None):
|
|
|
259
260
|
else:
|
|
260
261
|
response = service.send_message(message=message_text)
|
|
261
262
|
|
|
262
|
-
print(response.json())
|
|
263
263
|
response_json = response.json()
|
|
264
264
|
entries = response_json.get('entries', [])
|
|
265
265
|
_return = response_json.get('return', {})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|