Beispiel #1
0
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()
Beispiel #2
0
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")