Commit 9ae82c03 authored by PkSM3's avatar PkSM3

[OPTIM] views.subcorpus

parent 81895576
......@@ -492,10 +492,11 @@ def subcorpusJSON(request, project_id, corpus_id, start , end ):
project = Node.objects.get(id=project_id)
corpus = Node.objects.get(id=corpus_id)
type_document = NodeType.objects.get(name="Document")
# retrieving all the documents
documents = corpus.children.all()
number = corpus.children.count()
# documents = corpus.children.all()
documents = corpus.objects.filter(parent_id=corpus_id , type = type_document )
number = len(documents)
filtered_docs = []
# filtering documents by range-date
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment