def get_queryset(self): queryset = NeiHanArticle.objects.all() md5codeParam= self.kwargs['md5code'] if len(md5codeParam)>0: #修改 HandleNeiHanArticleDb.addNaiHanArticleBadNumber(md5codeParam) if md5codeParam is not None: queryset = queryset.filter(md5code=md5codeParam) return queryset
def get_queryset(self): queryset = NeiHanArticle.objects.all() useridParam= self.kwargs['userid'] articleParam=self.kwargs['article'] # get md5code if len(articleParam)>0: md5codeParam=GetMd5Code.getMd5(articleParam) HandleNeiHanArticleDb.insertNeiHanArticle(useridParam, articleParam, md5codeParam) if articleParam is not None: queryset = queryset.filter(md5code=md5codeParam) return queryset