예제 #1
0
def profile(request, username):
    print username
    userObj = Collection()
    userObj.username = username
    userinfo = ""
    userinfo = usersDal.findUser(userObj)
    return render_to_response("users/profile.html",{'userinfo':userinfo},RequestContext(request))
예제 #2
0
def login(request, *args, **kwargs):
    userObj = Collection()
    if request.method == 'POST' and request.POST:
        userObj.username = request.POST["username"]
        userObj.password = request.POST["password"]
        if not request.POST.get('remember_me',None):
            request.session.set_expiry(0)
        if not usersDal.findUser(userObj):
            messages.error(request, "error")
    return auth_views.login(request, *args, **kwargs)