Changeset 0013bdd19ea17ff1809bb2431bb3a920bcd712ee

Show
Ignore:
Timestamp:
02/22/09 00:54:15 (19 months ago)
Author:
Frederic Lepied <frederic.lepied@…>
Parents:
8e190b5404bcc72bccbbecf78e29d5c33a730180
Children:
c8726316b857d4928dbeff5dc0533ead2f120d44
git-committer:
Frederic Lepied <frederic.lepied@splitted-desktop.com> / 2009-02-22T00:54:15Z+0100
Message:

added a naviagtion by test names

Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • tester/templates/index.html

    r368f6e1 r0013bdd  
    1414{% endfor %} 
    1515</ul> 
     16<h2>Tests</h2> 
     17<ul> 
     18{% for testname in testnames %} 
     19<li><a href="/testname/{{ testname.id }}/">{{ testname }}</a></li> 
     20{% endfor %} 
     21</ul> 
    1622{% endblock %} 
  • tester/views.py

    r368f6e1 r0013bdd  
    114114    versions = SystemVersion.objects.all().order_by('-id') 
    115115    systems = System.objects.all().order_by('name') 
    116     return render_to_response('index.html', {'versions': versions, 'systems': systems})     
     116    testnames = TestName.objects.filter(available=True).order_by('name') 
     117    return render_to_response('index.html', {'versions': versions, 
     118                                             'systems': systems, 
     119                                             'testnames': testnames})     
    117120 
    118121def script(request, name): 
     
    125128    return render_to_response('system.html', {'system': s, 'logs': testlogs, 'boots': logs})     
    126129 
     130def testname(request, tstid): 
     131    name = get_object_or_404(TestName, id=tstid) 
     132    logs = TestLog.objects.filter(test_name=name).order_by('-date') 
     133    return render_to_response('tests.html', {'logs': logs, 'testname': name})     
     134 
    127135# views.py ends here 
  • urls.py

    r368f6e1 r0013bdd  
    2828    (r'^script/(?P<name>.+)/$', 'tester.views.script'), 
    2929    (r'^system/(?P<sysid>[0-9]+)/$', 'tester.views.system'), 
     30    (r'^testname/(?P<tstid>[0-9]+)/$', 'tester.views.testname'), 
    3031 
    3132    # Uncomment the next line to enable the admin: