first push

This commit is contained in:
2026-01-18 11:42:00 +03:30
commit 1704e7356b
723 changed files with 273450 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import requests
from django.http import HttpResponse
from LiveStock.models import Cooperative
from authentication.sahandsms.sms import USERNAME_SMS, PASSWORD_SMS, USERNAME_SMS_FINANCIAL, PASSWORD_SMS_FINANCIAL
from panel.helper import check_mobile_number
def send_sms_for_cooperative(request):
cooperative=Cooperative.objects.filter(trash=False)
for c in cooperative:
mobile=c.user.mobile
password=c.user.password
message = 'کاربر گرامی' \
f'\n' \
f'اطلاعات کاربری شما در سامانه به شرح زیر میباشد:' \
f'\n' \
f'\n' \
f'نام کاربری: {mobile}' \
f'\n' \
f'رمز عبور: {password}' \
f'\n' \
f'(سامانه رصدیار)' \
check_mobile = check_mobile_number(mobile)
if check_mobile:
u = "http://webservice.sahandsms.com/newsmswebservice.asmx/SendPostUrl?username={}&password={}&from=30002501&to={}&message={}".format(
USERNAME_SMS, PASSWORD_SMS,
mobile, message)
return HttpResponse('pk')