Ignore:
Timestamp:
10/11/10 13:17:13 (3 years ago)
Author:
Diego Mascialino <dmascialino@…>
Branch:
default
Message:

Fixed order and pagination for category views

H: Enter commit message. Lines beginning with 'HG:' are removed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cyclope/core/collections/frontend_views.py

    r232 r234  
    5757    is_default = True 
    5858    is_content_view = True 
    59      
     59 
    6060    def get_response(self, request, host_template, content_object): 
    6161        category = content_object 
     
    8484        category = content_object 
    8585        categorizations_list = category.categorizations.all() 
     86 
     87        # TODO(diegoM): ¡¡¡ No escala !!! 
     88        categorizations_list = sorted(categorizations_list, 
     89                                      key=lambda c: c.object_modification_date, 
     90                                      reverse=True) 
     91 
     92 
    8693        paginator = Paginator(categorizations_list, self.items_per_page) 
    8794 
     
    128135    verbose_name=_('simplified teaser list of Category members') 
    129136    is_region_view = True 
    130      
     137 
    131138    def get_response(self, request, host_template, content_object): 
    132139        category = content_object 
     
    177184    is_content_view = True 
    178185    is_region_view = True 
    179      
     186 
    180187    def get_response(self, request, host_template, content_object): 
    181188        collection = content_object 
Note: See TracChangeset for help on using the changeset viewer.