Re: [Django] #10944: Site app should be able to make absolute URLs.

2018-02-08 Thread Django
#10944: Site app should be able to make absolute URLs.
-+-
 Reporter:  Jeremy Dunck |Owner:
 |  Christopher Medrela
 Type:  New feature  |   Status:  assigned
Component:  contrib.sites|  Version:  1.0
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by André Cruz):

 * cc: André Cruz (added)


Comment:

 Seems like this would be a pretty useful feature to have, and one that I
 need.

 Is any one of those "hacks" blessed by the Django community? I'm doing
 this:


 {{{
 def handcraft_absolute_url(path):
 domain = Site.objects.get_current().domain
 scheme = 'https' if SESSION_COOKIE_SECURE else 'http'
 return '{scheme}://{domain}{path}'.format(domain=domain, path=path,
 scheme=scheme)
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.56d46a855ea74a25e5f7981d9147e708%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10944: Site app should be able to make absolute URLs.

2015-02-12 Thread Django
#10944: Site app should be able to make absolute URLs.
---+--
 Reporter:  jdunck |Owner:  krzysiumed
 Type:  New feature|   Status:  assigned
Component:  contrib.sites  |  Version:  1.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--

Comment (by mbertheau):

 Replying to [comment:9 SmileyChris]:
 > What's actually the good in the `{% site_url %}` tag? It seems like it
 should be able to take other sites, too (if you only have one site, why
 bother using this over the standard `request.build_absolute_uri()`?)

 I often find myself in a situation where I need an absolute URL but cannot
 use `request.build_absolute_uri()` because I don't have a request: cron
 jobs, celery tasks or api modules that I don't want to couple to the
 request. Afaics Django currently doesn't have a place to generate absolute
 URLs without a request, so everyone is hacking their own way. `Site` is a
 possible place to do it, but it'd have to learn about the scheme and port
 to be complete. `RequestSite` could take these from new settings, maybe:
 `SITE_SCHEME`, `SITE_PORT`.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.b2e8514355153a4c521be47bca431453%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10944: Site app should be able to make absolute URLs.

2014-06-13 Thread Django
#10944: Site app should be able to make absolute URLs.
---+--
 Reporter:  jdunck |Owner:  krzysiumed
 Type:  New feature|   Status:  assigned
Component:  contrib.sites  |  Version:  1.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  1
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by timo):

 * needs_better_patch:  0 => 1


Comment:

 Patch no longer applies cleanly.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.7d1cb53ffdc58bb3d4875a1f03f2aac0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #10944: Site app should be able to make absolute URLs.

2012-06-26 Thread Django
#10944: Site app should be able to make absolute URLs.
---+--
 Reporter:  jdunck |Owner:  krzysiumed
 Type:  New feature|   Status:  assigned
Component:  contrib.sites  |  Version:  1.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by krzysiumed):

 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #10944: Site app should be able to make absolute URLs.

2012-06-22 Thread Django
#10944: Site app should be able to make absolute URLs.
---+--
 Reporter:  jdunck |Owner:  krzysiumed
 Type:  New feature|   Status:  new
Component:  contrib.sites  |  Version:  1.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by krzysiumed):

 * owner:   => krzysiumed
 * cc: krzysiumed@… (added)


Comment:

 I added my draft where `site_url` is similar to `url` tag (actually it
 calls the `url` tag function and create instance of `URLNode` to avoid
 redundancy). It includes tests and docs but my english is poor. An example
 of using my `site_url`:

 {{{
   {% site_url site 'myapp.views.viewname' %} ==>
 'http://example.com/path/to/view'
   {% site_url site using https 'myapp.views.viewname' %} ==>
 'https://example.com/path/to/view'
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2012-02-04 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
 Reporter:  jdunck |Owner:
 Type:  New feature|   Status:  new
Component:  contrib.sites  |  Version:  1.0
 Severity:  Normal |   Resolution:
 Keywords: | Triage Stage:  Accepted
Has patch:  1  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+

Comment (by oinopion):

 site_url tag is a bit useless, as it take path as string. IMHO it should
 work like the url tag taking names and parameters.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2011-07-10 Thread Django
#10944: Site app should be able to make absolute URLs.
---+---
   Reporter:  jdunck   |  Owner:
   Type:  New feature  | Status:  new
  Milestone:   |  Component:  contrib.sites
Version:  1.0  |   Severity:  Normal
 Resolution:   |   Keywords:
   Triage Stage:  Accepted |  Has patch:  1
Needs documentation:  0|Needs tests:  0
Patch needs improvement:  0|  Easy pickings:  0
  UI/UX:  0|
---+---
Changes (by laurentluce):

 * status:  assigned => new
 * owner:  laurentluce =>
 * ui_ux:   => 0
 * easy:   => 0


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2011-04-17 Thread Django
#10944: Site app should be able to make absolute URLs.
---+-
   Reporter:  jdunck   |Owner:  laurentluce
   Type:  New feature  |   Status:  assigned
  Milestone:   |Component:  contrib.sites
Version:  1.0  | Severity:  Normal
 Resolution:   | Keywords:
   Triage Stage:  Accepted |Has patch:  1
Needs documentation:  0|  Needs tests:  0
Patch needs improvement:  0|
---+-
Changes (by julien):

 * type:   => New feature
 * severity:   => Normal


Comment:

 See also #13559 which suggests adding a context processor for this.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-12-22 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  laurentluce
Status:  assigned  | Milestone: 
 Component:  Contrib apps  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by ubernostrum):

  * milestone:  1.3 =>

Comment:

 1.3 is feature-frozen now.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-06 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  laurentluce
Status:  assigned  | Milestone:  1.3
 Component:  Contrib apps  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by laurentluce):

  * needs_better_patch:  1 => 0
  * needs_docs:  1 => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-06 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  laurentluce
Status:  assigned  | Milestone:  1.3
 Component:  Contrib apps  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  1 |   Needs_tests:  0  
Needs_better_patch:  1 |  
---+
Comment (by SmileyChris):

 What's actually the good in the `{% site_url %}` tag? It seems like it
 should be able to take other sites, too (if you only have one site, why
 bother using this over the standard `request.build_absolute_uri()`?)

 Bikeshedding, it could potentially just be a filter: `{% url index as
 home_url %}{{ client.site|site_url:home_url }}`
 But in that case, you'd probably need a `{% get_current_site as site %}`
 tag too...

 Anyway, just a bit of late night rambling.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-05 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  laurentluce
Status:  assigned  | Milestone:  1.3
 Component:  Contrib apps  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  1 |   Needs_tests:  0  
Needs_better_patch:  1 |  
---+
Changes (by gabrielhurley):

  * needs_better_patch:  0 => 1

Comment:

 Two thoughts:

  1. This method should be available on both Site and RequestSite. Using
 the new `django.contrib.sites.models.get_current_site` function (which
 returns either a Site or RequestSite instance) you could then construct
 full URLs without being tied to the sites framework.

  2. It seems like constructing the full URL is good, but personally I'd
 like to have it add the protocol (http:// or https://) as well. That bit
 is a little bit trickier and may not be within the scope of the Site
 object to know what the right protocol is. It just seems like a halfway-
 there solution to get a full URL but have to manually type the "http://;.

 And, as you already noted, the patch would need docs before it's done.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-04 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  laurentluce
Status:  assigned  | Milestone:  1.3
 Component:  Contrib apps  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  1  
Needs_docs:  1 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by laurentluce):

  * needs_docs:  0 => 1
  * has_patch:  0 => 1

Comment:

 - add method get_url to Site model to return an absolute url based on a
 relative path passed as an argument.[[BR]]

 - add site_url template tag doing the same

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-04 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  laurentluce
Status:  assigned  | Milestone:  1.3
 Component:  Contrib apps  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by laurentluce):

  * status:  new => assigned

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-04 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  laurentluce
Status:  new   | Milestone:  1.3
 Component:  Contrib apps  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by laurentluce):

  * owner:  anonymous => laurentluce
  * status:  assigned => new

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-04 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  anonymous
Status:  assigned  | Milestone:  1.3  
 Component:  Contrib apps  |   Version:  1.0  
Resolution:|  Keywords:   
 Stage:  Accepted  | Has_patch:  0
Needs_docs:  0 |   Needs_tests:  0
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * owner:  laurentluce => anonymous
  * status:  new => assigned

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-04 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  laurentluce
Status:  new   | Milestone:  1.3
 Component:  Contrib apps  |   Version:  1.0
Resolution:|  Keywords: 
 Stage:  Accepted  | Has_patch:  0  
Needs_docs:  0 |   Needs_tests:  0  
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * owner:  nobody => laurentluce

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-10-01 Thread Django
#10944: Site app should be able to make absolute URLs.
---+
  Reporter:  jdunck| Owner:  nobody
Status:  new   | Milestone:  1.3   
 Component:  Contrib apps  |   Version:  1.0   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by jezdez):

  * stage:  Design decision needed => Accepted

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #10944: Site app should be able to make absolute URLs.

2010-02-22 Thread Django
#10944: Site app should be able to make absolute URLs.
-+--
  Reporter:  jdunck  | Owner:  nobody
Status:  new | Milestone:  1.3   
 Component:  Contrib apps|   Version:  1.0   
Resolution:  |  Keywords:
 Stage:  Design decision needed  | Has_patch:  0 
Needs_docs:  0   |   Needs_tests:  0 
Needs_better_patch:  0   |  
-+--
Changes (by daniellindsley):

  * milestone:  1.2 => 1.3

Comment:

 Deadline for features in 1.2 is past. Deferring to 1.3.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.