Changeset 21311 for lang/python

Show
Ignore:
Timestamp:
10/14/08 16:47:30 (3 months ago)
Author:
nishio
Message:

/lang/python/saichugen/ high score/log template

Location:
lang/python/saichugen/gae
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • lang/python/saichugen/gae/index.yaml

    r21290 r21311  
    1818    direction: desc 
    1919 
    20 # Used 11 times in query history. 
     20# Used 28 times in query history. 
    2121- kind: Game 
    2222  properties: 
  • lang/python/saichugen/gae/saichugen/main/views.py

    r21293 r21311  
    2020        .order("-started").fetch(10)) 
    2121 
     22    high_score = ( 
     23        Player.all().filter("score >", 0) 
     24        .order("score").fetch(10)) 
     25 
    2226    return HttpResponse( 
    2327        template.render( 
     
    2832                login_url=users.create_login_url(req.get_full_path()), 
    2933                logout_url=users.create_logout_url(req.get_full_path()), 
    30                 recent_games=recent_games, ))) 
     34                recent_games=recent_games,  
     35                high_score=high_score, ))) 
    3136 
    3237def start_single_game(req): 
  • lang/python/saichugen/gae/template/index.html

    r21292 r21311  
    2424<li><a href="http://saichugen-online.appspot.com/game/210/">チャット機能搭載時のログ</a>(対戦履歴の例) 
    2525</ul> 
    26 <p> 
     26<div style="float:left"> 
    2727Recent games:<ul> 
    2828{% for g in recent_games %} 
     
    3131{% endfor %} 
    3232</ul> 
    33  
    34 <p> 
     33</div> 
     34<div style="float:left"> 
     35High score:<ul> 
     36{% for p in high_score %} 
     37<li>{{ p.get_nick }}({{ p.score }}/{{ p.play_count }})</li> 
     38{% endfor %} 
     39</ul> 
     40</div> 
     41<div style="clear:both"> 
    3542<hr> 
    3643program by <a href="http://www.nishiohirokazu.org/">NISHIO Hirokazu</a><br/> 
    3744card graphics by http://www.jfitz.com/cards/ 
     45</div>