def maitenance(request): admins = main_utils.get_all_admins() leavetypes = main_utils.get_all_leave_types() departments = main_utils.get_all_departments() cycle = utils.read(utils.resfile(), 'Default', 'email.alert.cycle') return render_to_response('maitenance/maitenance.html',RequestContext(request, { 'admins': admins, 'leavetypes': leavetypes, 'departments': departments, 'nav': 'settings', 'cycle': cycle}) )
def setcycle(request): if request.method == 'POST': cycle = request.POST.get('cycle') utils.write(utils.resfile(), 'Default', 'email.alert.cycle', cycle) return redirect('/eleave/main/settings')