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 [email protected] <javascript:> 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 [email protected] <javascript:>.
> To post to this group, send email to [email protected]
> <javascript:>.
> 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
>
> <https://groups.google.com/d/msgid/django-users/253c999f-2151-4b42-8bd9-f7288f57c394%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
To post to this group, send email to [email protected].
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.