#10608: Support RequestSite along with Sites.objects.get_current() in contrib
-----------------------------------+----------------------------------------
          Reporter:  hvendelbo     |         Owner:  nobody
            Status:  new           |     Milestone:  1.2   
         Component:  Contrib apps  |       Version:  1.0   
        Resolution:                |      Keywords:        
             Stage:  Accepted      |     Has_patch:  1     
        Needs_docs:  0             |   Needs_tests:  0     
Needs_better_patch:  1             |  
-----------------------------------+----------------------------------------
Comment (by veena):

 The management of the "if statements" in applications will be annoying,
 don't you think?

 Shouldn't there be a Site class not inherited from django.db.models.Model
 but provide API for getting data? Then if site app is installed it can use
 database as a storage for site data. If site app is not installed, it will
 use RequestSite class. Of course, request object is need to be passed.

 It forces not to use construction like "current_site.flatpage_set.all()"
 but "Flatpage.objects.filter(sites=site)" and also "if statements" don't
 need to be used.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10608#comment:6>
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 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to