Simulating a POST request in Django
问题 Let's suppose I have the following url: /valid/django/app/path/?foo=bar&spam=eggs I can simulate a request to this URL in Django thusly: from django.shortcuts import render from django.core.urlresolvers import resolve def simulate(request, url=None, template_name="not_important.html"): if url: dv = resolve(url.split('?')[0]) return dv.func(request, *dv.args, **dv.kwargs) else: return render(request, template_name) However, I'd like to include the parameters to the included view, so that the