From cb288a937848687d3e89c7391c6e868bc9f28eb5 Mon Sep 17 00:00:00 2001 From: iceTwy Date: Thu, 3 Apr 2014 23:18:55 +0200 Subject: [PATCH 1/3] Add more expiration options --- zerobin/paste.py | 14 ++++++++++++++ zerobin/views/home.tpl | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/zerobin/paste.py b/zerobin/paste.py index bb5c456..a39639b 100644 --- a/zerobin/paste.py +++ b/zerobin/paste.py @@ -18,8 +18,22 @@ class Paste(object): DIR_CACHE = set() DURATIONS = { + u'10_mins': 10 * 60, + u'30_mins': 30 * 60, + u'1_hour': 1 * 3600, + u'3_hours': 3 * 3600, + u'6_hours': 6 * 3600, + u'12_hours': 12 * 3600, u'1_day': 24 * 3600, + u'2_days': 2 * 24 * 3600, + u'5_days': 5 * 24 * 3600, + u'10_days': 10 * 24 * 3600, + u'15_days': 15 * 24 * 3600, + u'20_days': 20 * 24 * 3600, u'1_month': 30 * 24 * 3600, + u'2_months': 2 * 30 * 24 * 3600, + u'6_months': 6 * 30 * 24 * 3600, + u'1_year': 12 * 30 * 24 * 3600, u'never': 365 * 24 * 3600 * 100, } diff --git a/zerobin/views/home.tpl b/zerobin/views/home.tpl index f4b5d7f..1207103 100644 --- a/zerobin/views/home.tpl +++ b/zerobin/views/home.tpl @@ -8,8 +8,22 @@ From e888b758262a7193d50b00785f881255be2cd928 Mon Sep 17 00:00:00 2001 From: iceTwy Date: Tue, 8 Apr 2014 17:36:46 +0200 Subject: [PATCH 2/3] Don't forget expiration options for paste.tpl --- zerobin/views/paste.tpl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/zerobin/views/paste.tpl b/zerobin/views/paste.tpl index be5993d..9739699 100644 --- a/zerobin/views/paste.tpl +++ b/zerobin/views/paste.tpl @@ -64,8 +64,22 @@ From 03566e000d1d78d56c2d65c383850408151402ce Mon Sep 17 00:00:00 2001 From: iceTwy Date: Tue, 8 Apr 2014 17:41:22 +0200 Subject: [PATCH 3/3] [paste.tpl] fix indentation from last commit --- zerobin/views/paste.tpl | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/zerobin/views/paste.tpl b/zerobin/views/paste.tpl index 9739699..8fb9ce1 100644 --- a/zerobin/views/paste.tpl +++ b/zerobin/views/paste.tpl @@ -63,24 +63,24 @@