@csrf_protect
def aifile_edit(request, aifile_name=None, editmode='edit'):
 if (not test_user_authenticated(request)):
  return login(request, next=('/cobbler_web/aifile/edit/file:%s' % aifile_name), expired=True)
 if (editmode == 'edit'):
  editable = False
 else:
  editable = True
 deleteable = False
 aidata = ''
 if (aifile_name is not None):
  editable = remote.check_access_no_fail(request.session['token'], 'modify_autoinst', aifile_name)
  deleteable = (not remote.is_autoinstall_in_use(aifile_name, request.session['token']))
  aidata = remote.read_autoinstall_template(aifile_name, request.session['token'])
 t = get_template('aifile_edit.tmpl')
 html = t.render(RequestContext(request, {'aifile_name': aifile_name, 'deleteable': deleteable, 'aidata': aidata, 'editable': editable, 'editmode': editmode, 'version': remote.extended_version(request.session['token'])['version'], 'username': username}))
 return HttpResponse(html)

@ csrf_protect def aifile_edit ( request , aifile_name = None , editmode = 'edit' ) : if ( not test_user_authenticated ( request ) ) : return login ( request , next = ( '/cobbler_web/aifile/edit/file:%s' % aifile_name ) , expired = True ) if ( editmode == 'edit' ) : editable = False else : editable = True deleteable = False aidata = '' if ( aifile_name is not None ) : editable = remote . check_access_no_fail ( request . session [ 'token' ] , 'modify_autoinst' , aifile_name ) deleteable = ( not remote . is_autoinstall_in_use ( aifile_name , request . session [ 'token' ] ) ) aidata = remote . read_autoinstall_template ( aifile_name , request . session [ 'token' ] ) t = get_template ( 'aifile_edit.tmpl' ) html = t . render ( RequestContext ( request , { 'aifile_name' : aifile_name , 'deleteable' : deleteable , 'aidata' : aidata , 'editable' : editable , 'editmode' : editmode , 'version' : remote . extended_version ( request . session [ 'token' ] ) [ 'version' ] , 'username' : username } ) ) return HttpResponse ( html )
this is the page where an automatic os installation file is edited .