コード例 #1
0
ファイル: views.py プロジェクト: heecho/team-org
def create(request):
	d = Department()
	d.name = request.POST['name']
	d.capacity = float(request.POST['capacity'])*19.6*12*8
	d.save()
	dept_id = d.id
	return HttpResponseRedirect(reverse('teams:show', args = (dept_id,)))
コード例 #2
0
ファイル: data_entry.py プロジェクト: heecho/team-org
def create_department(name, capacity):
	dept = Department()
	dept.name = name
	#capacity = headcount*19.6(working days per month)*12 months
	dept.capacity = capacity
	dept.save()