On Wed, 2018-08-01 at 00:26 -0700, [email protected] wrote:
> 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)

Well, apart from everything, making a request with user and password in the 
clear
it's not a good idea at all.

-- 
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/1533108947.1719.1.camel%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to