Wednesday, August 1, 2018

Re: How to write api for sms intregartion in django I am new in django?

Here is my code


class RegisterView(CreateView):
form_class = RegisterForm
template_name = 'accounts/register.html'
success_url = '/success-membership/'

def form_valid(self, form):
url = "http://enterprise.smsgupshup.com/GatewayAPI/rest"
payload = "method=sendMessage&send_to=XXXXXXXXXX&msg=new&msg_type=TEXT&userid=XXXXX&auth_scheme=PLAIN&password=XXXXX&format=TEXT"
response = requests.request("POST", url, data=payload)
print(response.text)
return HttpResponse(response)

On Wednesday, August 1, 2018 at 12:47:55 PM UTC+5:30, Tim Vogt wrote:
https://www.twilio.com/blog/2014/04/building-a-simple-sms-message-application-with-twilio-and-django-2.html


Op 1 aug. 2018, om 09:15 heeft im...@wsegames.com het volgende geschreven:

I want to write a api when form submit a sms should go to the phone, I don't know how to do that can somone help me regarding this?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/253c999f-2151-4b42-8bd9-f7288f57c394%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2d3b91f8-1636-4625-85b5-40699401c3e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment