Re: Site app should be able to make absolute URLs #10944
I added a new patch with the following changes: - added get_url() to RequestSite - added support for protocol to get_url() and template tag site_url. You can pass a protocol like 'https', default is 'http'. - updated docs. I agree with SmileyChris that the template tag site_url doesn't provide enough value. Can people reply to this email with potential improvements to make this new tag more useful. Let's start a discussion basically. Laurent On Oct 5, 2:52 pm, Gabriel Hurleywrote: > I added some feedback on the ticket. Looks like a good start! > > - Gabriel > > On Oct 4, 2:12 pm, Laurent Luce wrote: > > > Hello, > > > I added a patch to this ticket http://code.djangoproject.com/ > > ticket/10944">#10944 > > > - add method get_url to Site model to return an absolute url based on > > a relative path passed as an argument. > > - add site_url template tag doing the same > > > I am not sure about the method and template tag names. Better naming > > is welcome. > > > Can someone review the patch? > > > I will work on the documentation changes when I get more feedback. > > > Laurent Luce -- 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.
Re: Site app should be able to make absolute URLs #10944
I added some feedback on the ticket. Looks like a good start! - Gabriel On Oct 4, 2:12 pm, Laurent Lucewrote: > Hello, > > I added a patch to this ticket http://code.djangoproject.com/ > ticket/10944">#10944 > > - add method get_url to Site model to return an absolute url based on > a relative path passed as an argument. > - add site_url template tag doing the same > > I am not sure about the method and template tag names. Better naming > is welcome. > > Can someone review the patch? > > I will work on the documentation changes when I get more feedback. > > Laurent Luce -- 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.
Site app should be able to make absolute URLs #10944
Hello, I added a patch to this ticket http://code.djangoproject.com/ ticket/10944">#10944 - add method get_url to Site model to return an absolute url based on a relative path passed as an argument. - add site_url template tag doing the same I am not sure about the method and template tag names. Better naming is welcome. Can someone review the patch? I will work on the documentation changes when I get more feedback. Laurent Luce -- 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.