Ignore:
Timestamp:
07/05/10 12:56:53 (23 months ago)
Author:
dart
Message:

LoReality?:
o Add squadrons, pilots.
o Lot of fix
o Some cosmetics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loreality/loreality/controllers/pilot.py

    r2100 r2104  
    2424class PilotController(BaseController): 
    2525 
     26    #-------------------------------------------------------------- 
     27    def index(self, values=None, errors=None ): 
     28        c.heading = "Pilots" 
     29        c.title = "All pilots" 
     30 
     31        pilot_q = meta.Session.query(model.Pilot).order_by( model.Pilot.name ) 
     32        c.pilots = pilot_q.all() 
     33 
     34        html = render('/derived/page/overview_pilot.html') 
     35        return  htmlfill.render(html, defaults=values, errors=errors) 
     36    #-------------------------------------------------------------- 
    2637    def view(self, id, values=None, errors=None ): 
    2738        if id is None: 
     
    3243            abort(404) 
    3344 
    34         c.title = "LoReality" 
    35         c.heading = pilot.name 
     45        c.heading = "Pilots" 
     46        c.title = pilot.name 
    3647        c.pilot = pilot 
    3748 
     
    3950        return  htmlfill.render(html, defaults=values, errors=errors) 
    4051 
     52    #-------------------------------------------------------------- 
    4153    @authorize(h.auth.is_creator) 
    4254    def edit(self, id=None, values=None, errors=None  ): 
     
    4860            abort(404) 
    4961 
    50         c.title = "LoReality" 
    51         c.heading = "Edit %s"%pilot.name 
     62        c.heading = "Pilots" 
     63        c.title = "Edit %s"%pilot.name 
    5264        c.pilot = pilot 
    5365 
Note: See TracChangeset for help on using the changeset viewer.