예제 #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()
예제 #2
0
파일: views.py 프로젝트: ludflu/getrdone
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")