Changeset 72

Show
Ignore:
Timestamp:
06/28/08 13:19:22 (2 months ago)
Author:
nobu
Message:

pluggable-contents:

  • バグ修正。
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/pluggable-contents/plugins/views.py

    r70 r72  
    102102        SELECT 
    103103            COUNT(e.%(id)s) as cnt, 
    104             EXTRACT(YEAR FROM e.%(created_at)s) as year, 
    105             EXTRACT(MONTH FROM e.%(created_at)s) as month 
     104            EXTRACT(YEAR FROM e.%(published_at)s) as year, 
     105            EXTRACT(MONTH FROM e.%(published_at)s) as month 
    106106        FROM %(blog_entry)s e 
    107107        WHERE 
     
    112112        """ % { 
    113113            'id': qn('id'), 
    114             'created_at': qn('created_at'), 
     114            'published_at': qn('published_at'), 
    115115            'blog_entry': qn('blog_entry'), 
    116116            'is_active': qn('is_active'), 
     
    119119        obj_list = [] 
    120120        for count, year, month in cursor.fetchall(): 
     121            print count, year, month 
     122            if year is None or month is None: 
     123                continue 
    121124            obj_list.append(ArchiveLink(date=datetime.date(year, month, 1), 
    122125                                        count=count)) 
     
    264267            'id': u'comment-list', 
    265268            'obj_list': obj_list, 
    266             'title': _(u'Recent Comments'), 
     269            'title': _(u'Recent Entries'), 
    267270        }) 
    268271        t = loader.get_template('blog/_links.html')