Esempio n. 1
0
def SearchAdd(HttpRequest):
  try:
    contr=Search()
    ControlsInfo=HttpRequest.POST['ControlsInfo']
    Search_Options=HttpRequest.POST['Search_Options']
    ControlsInfo=ControlsInfo+Search_Options+','
    data=HttpRequest.POST
    Search_Controls=contr.getSearchControls(ControlsInfo,data)
    return render_to_response('Search/search.html',{'options':contr.getOptions(),'ControlsInfo':ControlsInfo,'Search_Controls':Search_Controls},context_instance=RequestContext(HttpRequest))
    
  except Exception, ex:
      frame = inspect.currentframe()
      args, _, _, values = inspect.getargvalues(frame)
      msg = ''
      for i in args:
        msg += "[%s : %s]" % (i,values[i])
      #LoggerJobs.exception('%s : %s' % (inspect.getframeinfo(frame)[2],msg))
      messages.error(HttpRequest,'ERROR: ' + str(ex))
      return HttpResponseRedirect('/message/')
Esempio n. 2
0
def Search_Search(HttpRequest):
  try:
    contr=Search()
    ControlsInfo=HttpRequest.POST['ControlsInfo']
    data=HttpRequest.POST
    Search_Controls=contr.getSearchControls(ControlsInfo,data)
    obj=[('UserId','Email','DOB','FirstName','MiddleName','LastName','Gender','Age','RollNo','BranchMajor','BranchMinor','Degree','Category','10th','12th','BE_AGG','BE_ReappearRemaining','AIEEE','MobileNo','PresentAdressNo','PresentStreetAdress1','PresentStreetAdress2','PresentCityName','PresentStateName','PresentPinCode')]
    StudentList=contr.getSearchResults(ControlsInfo,data)
    if(StudentList<>None):
      StudentList=obj+StudentList
    return render_to_response('Search/search.html',{'options':contr.getOptions(),'ControlsInfo':ControlsInfo,'Search_Controls':Search_Controls,'StudentList':StudentList},context_instance=RequestContext(HttpRequest))
    
  except Exception, ex:
      frame = inspect.currentframe()
      args, _, _, values = inspect.getargvalues(frame)
      msg = ''
      for i in args:
        msg += "[%s : %s]" % (i,values[i])
      #LoggerJobs.exception('%s : %s' % (inspect.getframeinfo(frame)[2],msg))
      messages.error(HttpRequest,'ERROR: ' + str(ex))
      return HttpResponseRedirect('/message/')