示例#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")