예제 #1
0
def defaults(): #creates the default user, all users' defaultKinds start as his
	defu = User()
	defu.name = 'RED UNICORN'
	defu.code = 'REDUNICORN'
	defu.save()
	defaultKinds = ['School', 'Work', 'Household', 'Social']
	for k in defaultKinds:
		newKind = Kind()
		newKind.name = k
		newKind.save()
		defu.defaultKinds.add(newKind)
	defu.save()
	return None
예제 #2
0
def kind(request):
    k = Kind()
    k.name = request.POST.get('kind')
    k.save()