MobileBlur

Check-in [fe10ff441d]
Login
Overview
SHA1:fe10ff441dad1a4806579e9497e323d652d41ac1
Date: 2011-11-29 05:23:15
User: spiffy
Comment:Fixed story list to omit stories below the intelligence threshold
Timelines: family | ancestors | descendants | both | develop
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2011-11-29
17:03
[80b3160c8d] Replaced the lame knockoff of NCSU's colors with the Albany theme from Adobe Kuler (user: spiffy, tags: develop)
05:23
[fe10ff441d] Fixed story list to omit stories below the intelligence threshold (user: spiffy, tags: develop)
2011-11-22
23:56
[b28babbbb4] Somehow routes.py never got added to the repo (user: spiffy, tags: develop)
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified applications/mobileblur/views/feeds/view.html from [a3c96a9b2b] to [55ca9ae222].

     6      6   {{ end }}
     7      7   
     8      8   <section id="story-list">
     9      9   {{
    10     10   import time 
    11     11   s = time.time()
    12     12   }}
    13         -    {{ for story in stories: }}
           13  +    {{ for story in stories: 
           14  +        if sum([v for k,v in story["intelligence"].iteritems()]) < threshold:
           15  +            continue
           16  +    }}
           17  +
           18  +        {{ print story["read_status"] }}
    14     19           <div class="story">
    15         -            <a href="{{= URL(c="stories", f="view", vars=dict(story=story["id"], feed_id=feed["id"])) }}" class="{{= "unread" if story["read_status"] == 1 else "read" }}">
           20  +            <a href="{{= URL(c="stories", f="view", vars=dict(story=story["id"], feed_id=feed["id"])) }}" class="{{= "unread" if story["read_status"] == 0 else "read" }}">
    16     21                   {{= story["story_title"] }}
    17     22               </a>
    18     23               <p>{{= story["story_date"] }}</p>
    19     24           </div>
    20     25       {{ pass }}
    21     26   {{ print time.time() - s }}
    22     27   </section>