I need using RequestFactory instead of Client to test one of my views. So the question is how to generate proper CSRF token to provide it to my @csrf_protect'ed view? At this moment I get 403 error when generating POST request. I've read similar topic in this group dated 2011 year, but that topic observed solution of the problem using Client class and it's parameter enforce_csrf.
-- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.