On Dec 17, 8:57 am, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Wed, Dec 16, 2009 at 2:53 PM, Mike Malone <mjmal...@gmail.com> wrote: > > How's that different than the current situation, where we return an > > absolute URL reference that can be converted into an absolute URL > > using request.build_absolute_uri? > > It allows an object to return a URL that already has it's domain > defined (as might happen for a SaaS site with custom subdomains). >
build_absolute_uri allows that already. >>> r = HttpRequest() >>> r.META['SERVER_NAME'] = 'test.com' >>> r.META['SERVER_PORT'] = '80' >>> r.build_absolute_uri('fish') 'http://test.com/fish' >>> r.build_absolute_uri('//fish.com/fish') 'http://fish.com/fish' >>> r.build_absolute_uri('https://fish.com/fish') 'https://fish.com/fish' -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.