def get_queryset(self): queryset = Poetry.objects.all() useridParam= self.kwargs['userid'] poetryParam=self.kwargs['poetry'] # get md5code if len(poetryParam)>0: md5codeParam=GetMd5Code.getMd5(poetryParam) HandlePoetryDb.insertPoetry(useridParam,poetryParam, md5codeParam) if poetryParam 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