amitt001 / pygmy

An open-source, feature rich & extensible url-shortener + analytics written in Python :cookie:
https://demo.pygy.co/pygmy
MIT License
703 stars 135 forks source link

Adding Expiration Minutes to Dashboard #27

Open lukaalba opened 6 years ago

lukaalba commented 6 years ago

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.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 54.973% when pulling 1a5003808bc9920171d519d5e83dbcb3d1ad69b5 on lukaalba:add_expire into 81e1de010c9501efa1c024a2d70fa3c8da13ab52 on amitt001:master.

amitt001 commented 6 years ago

@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).

lukaalba commented 6 years ago

@amitt001 great idea, but I'm new to Python and Django. Can you tell me which file(s) I need to edit?

amitt001 commented 5 years ago

@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