def aifile_list(request, page=None):
 if (not test_user_authenticated(request)):
  return login(request, next='/cobbler_web/aifile/list', expired=True)
 aifiles = remote.get_autoinstall_templates(request.session['token'])
 aifile_list = []
 for aifile in aifiles:
  aifile_list.append((aifile, 'editable'))
 t = get_template('aifile_list.tmpl')
 html = t.render(RequestContext(request, {'what': 'aifile', 'ai_files': aifile_list, 'version': remote.extended_version(request.session['token'])['version'], 'username': username, 'item_count': len(aifile_list[0])}))
 return HttpResponse(html)

def aifile_list ( request , page = None ) : if ( not test_user_authenticated ( request ) ) : return login ( request , next = '/cobbler_web/aifile/list' , expired = True ) aifiles = remote . get_autoinstall_templates ( request . session [ 'token' ] ) aifile_list = [ ] for aifile in aifiles : aifile_list . append ( ( aifile , 'editable' ) ) t = get_template ( 'aifile_list.tmpl' ) html = t . render ( RequestContext ( request , { 'what' : 'aifile' , 'ai_files' : aifile_list , 'version' : remote . extended_version ( request . session [ 'token' ] ) [ 'version' ] , 'username' : username , 'item_count' : len ( aifile_list [ 0 ] ) } ) ) return HttpResponse ( html )
list all automatic os installation templates and link to their edit pages .