Commit 6b29957f authored by PkSM3's avatar PkSM3

[UPDATE] new paginator inside corpus.html

parent 4a2ebbce
......@@ -318,7 +318,7 @@ def corpus_trial(request, project_id, corpus_id):
except ValueError:
raise Http404()
t = get_template('corpus_trial.html')
t = get_template('corpus.html')
user = request.user
date = datetime.datetime.now()
......@@ -373,6 +373,7 @@ def newpaginatorJSON(request , corpus_id):
type_document_id = cache.NodeType['Document'].id
documents = session.query(Node).filter(Node.parent_id==corpus_id , Node.type_id == type_document_id ).all()
filtered_docs = []
for doc in documents:
if "publication_date" in doc.metadata:
......@@ -391,6 +392,7 @@ def newpaginatorJSON(request , corpus_id):
results = sorted(filtered_docs, key=lambda x: x["date"])
for i in results:
i["date"] = i["date"].strftime("%Y-%m-%d")
print( i["date"] , i["id"] , i["name"])
finaldict = {
"records":results,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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