def get_issue_item(self,project_id,user_id): issue_context=self.get_issue_context(project_id) issue_list_controll=self.get_issue_more(project_id, user_id,0) issue_count=len(IssueService.all_issues(project_id,user_id)) key=str(user_id)+"_issue_searchkeyword" search_word=RedisService.get_value(key) pagefileds={"issue_context":issue_context,"issue_list_controll":issue_list_controll,"issue_count":issue_count,"search_word":search_word} return self.get_webpart(pagefileds,ProjectIssuePath.issue_item_list)
def get_issue_more(self,project_id,user_id,page_index): start_issue_index=int(page_index*10) end_issue_index=int((page_index+1)*10) dm_issues=IssueService.all_issues(project_id,user_id)[start_issue_index:end_issue_index] issue_items=list() for dm_issue in dm_issues: temp_vm_issue=VM_ProjectIssue(self.request.user.id,dm_issue) issue_items.append(temp_vm_issue) pagefileds={"issue_items":issue_items} return self.get_webpart(pagefileds,ProjectIssuePath.issue_item_controll)