如何显示自创建以来的时间而不是创建时间

时间:2017-02-01 15:56:10

标签: python django

我正在努力在django中显示帖子,目前在帖子创建时显示,我正在使用{{ instance.post_created }}

如果帖子是"2 days ago"并且该人在28th of Jan上查看的话,我想知道是否还有30th of Jan我可以说它{ "recipients": { "signers": [ { "email": "johnsmith@xyz.com", "name": "john smith", "recipientId": 1, "tabs": { "numberTabs": [ { "name": "Amount Tab", "required": "true", "tabLabel": "Amount", "documentId": "1", "recipientId": "1", "pageNumber": "1", "xPosition": "70", "yPosition": "119", "width": "42", "height": "11", } ], "noteTabs": [ { "value": "Amount cannot be more than hundred", "name": "Note to recipient", "tabLabel": "Validation Message", "fontColor": "brightred", "documentId": "1", "recipientId": "1", "pageNumber": "1", "xPosition": "132", "yPosition": "112", "width": "231", "height": "20", "conditionalParentLabel": "NumberValidation", "conditionalParentValue": "1", "tabType": "note" } ], "formulaTabs": [ { "formula": "[Amount] > 100", "roundDecimalPlaces": "0", "name": "Formula Tab", "locked": "true", "concealValueOnDocument": "true", "tabLabel": "NumberValidation", "documentId": "1", "recipientId": "1", "pageNumber": "1", "tabType": "formula" } ] } } ] }, "documents": [ { "documentId": "1", "name": "doc.pdf", "fileExtension" : "pdf", "documentBase64": "{Removed}" } ], "emailSubject": "Testing Validation", "status": "sent" }

1 个答案:

答案 0 :(得分:0)

您可以使用Naturaltime或使用javascript

手动执行此操作