pygmy
pygmy copied to clipboard
Adding Expiration Minutes to Dashboard
There is only a column whether a link is expired or not and I think it is useful to see additionally, what value was set during the creation of the short link.
Coverage remained the same at 54.973% when pulling 1a5003808bc9920171d519d5e83dbcb3d1ad69b5 on lukaalba:add_expire into 81e1de010c9501efa1c024a2d70fa3c8da13ab52 on amitt001:master.
@lukaalba Good idea and thanks for the PR.
I think it would be more informative to a user if there is an exact timestamp link expired. Would you like to modify your pr to show 'Expire At'?
Expire at can be calculated by adding created_at + timedelat(expire_after).
@amitt001 great idea, but I'm new to Python and Django. Can you tell me which file(s) I need to edit?
@lukaalba apologies for the late reply. It's this file https://github.com/amitt001/pygmy/blob/master/pygmyui/templates/pygmy/dashboard.html#L15 You already get all the data required for calculating that value
You can reference this file as this contains keys that are returned https://github.com/amitt001/pygmy/blob/master/pygmy/model/link.py#L18