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
def kind(request): k = Kind() k.name = request.POST.get('kind') k.save()