#10235: contrib.sitemaps doesn't support RequestSite
--------------------------+-------------------------------------------------
 Reporter:  arthurk       |       Owner:  nobody    
   Status:  new           |   Milestone:  post-1.0  
Component:  Contrib apps  |     Version:  1.0       
 Keywords:  sitemap       |       Stage:  Unreviewed
Has_patch:  1             |  
--------------------------+-------------------------------------------------
 The contrib.sitemaps app will always query the database for a Site object.
 It doesn't support RequestSite objects
 (http://docs.djangoproject.com/en/dev/ref/contrib/sites/#requestsite-
 objects).

 The attached patch solves this issue. However, it is pretty hard to test
 this because the runtests.py has 'django.contrib.sites' in
 ALWAYS_INSTALLED_APPS, so checking if the app is installed with:

 {{{
     if Site._meta.installed:
         current_site = Site.objects.get_current()
     else:
         current_site = RequestSite(request)
 }}}

 won't work because the tests will always assume that the app is installed
 and query the database.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10235>
Django <http://code.djangoproject.com/>
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to