def createprofile(request,username=None, password=None): custObj = Collection() info = [] print username flag=1 if username and password: custObj.username, custObj.password = custBll.decode_data(username, password) print custObj.username+custObj.password print custDal.activateDir(custObj) user = authenticate(username=custObj.username, password=custObj.password) log(request, user) print "checking auth" if request.user.is_authenticated(): custObj.username=request.user info = custDal.findCustomer(custObj) if info.is_active: return render_to_response('customers/createprofile.html',{'info':info,"flag":flag},RequestContext(request)) messages.error(request, "activate account by cliking the link forwarded to your email") return HttpResponseRedirect("/")
def viewprofile(request,userid): custObj = Collection() info = [] custObj.userid = userid info = custDal.findCustomer(custObj) return render_to_response('customers/createprofile.html',{'info':info}, context_instance=RequestContext(request))