def user_created(sender, user, request, **kwargs): title = 'test list' list = List(title=title) now = datetime.datetime.now() list.save() owner = ListOwner(list=list,owner=user,date_shared=now) owner.save()
def addList(request): title = request.POST.get('title') user = request.user list = List(title=title) now = datetime.datetime.now() list.save() owner = ListOwner(list=list,owner=user,date_shared=now) owner.save() return HttpResponse("ok")