I wouldn't do it this way.
Personally, I would make the POST request in the view function, put
the return value in the context. The template isn't a good place to
have logic. It should only take data and format them.

2016-09-01 5:33 GMT+02:00 Al Johri <[email protected]>:
> Hi Django Users,
>
> I want to make a custom template tag where the tag's renderer needs to make
> a POST request.
>
> https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/#writing-the-renderer
> https://docs.djangoproject.com/en/1.10/howto/custom-template-tags/#thread-safety-considerations
>
> Is it possible to render the nodes of a template in multiple threads? I
> would ideally like those POST requests to happen at the same time.
>
> Does anyone know of some similar project?
>
> Thanks,
>
> Al
>
> --
> 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/84ccc6dc-ae1d-404c-9a05-1b72fc36a778%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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/CAEuG%2BTb_9_0eEV3MQR7EqxQGAxK%2BcfNNCy%3Df3vf3%2B9DOZiohoA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to