When developing with Django without a web server (serving directly from Django) I have a problem with external urls that lack the domain part and have parameters.
Let's say I'm using a javascript library that does an ajax call to "/prefix/foo/bar?q=1" (the url is not something I can change). It is not a problem for the production server but only a problem when not using a web server. I can redirect by adding the following pattern to my urlpatters:
(r'^prefix/(?P.*)$', 'django.views.generic.simple.redirect_to', {'url': 'htttp://example.com/prefix/%(path)s'}),
but of course %(path)s will only contain "foo/bar" not "foo/bar?q=1".
Is there a way to handle this problem with Django?