Changes between Initial Version and Version 1 of Ticket #15089, comment 47


Ignore:
Timestamp:
03/20/2013 09:43:08 AM (6 years ago)
Author:
Florian Apolloner
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15089, comment 47

    initial v1  
    66> There are plenty of areas of Django that need to be aware of the current site and that aren't reached (most of the time for good reasons) by the request object. The remaining uses of `Site.objects.get_current()` in the codebase (instead of `get_current_site()`) hint at the problem.
    77
    8 If you API requires a Site, pass in a Site object where needed.
     8If your API requires a Site, pass in a Site object where needed.
    99
    1010> Particularly troublesome if the SITE_ID is only available in the request:
     
    1515> - Random methods that don't get the request as parameter even though the calling method had access to it.
    1616
    17 That's a problem in the API.
     17That's a problem in the API, not in the sites stuff.
    1818
    1919> - Methods called from templates such as `get_absolute_url()`. Being able to pass the request as a parameter to such methods is the main reason I've been assessing Jinja2.
Back to Top