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 add_department_view(request): from forms import DepartmentForm form = None if request.method == 'POST': form = DepartmentForm(request.POST) if form.is_valid(): form.save() else: form = DepartmentForm() deps = main_utils.get_all_departments() from django.template import RequestContext return render_to_response('maitenance/department.html', RequestContext(request, {'form': form, 'deps': deps}))
def deps_and_teams(request): departments = main_utils.get_all_departments() return render_to_response('maitenance/department.html', { 'departments': departments })