comparison roundup/cgi/templating.py @ 5973:fe334430ca07

issue2550919 - Anti-bot signup using 4 second delay Took the code by erik forsberg and massaged it into the core. So this is no longer needed in the tracker. Updated devel and responsive trackers to remove timestamp.py and update input field name. Docs, changes and tests complete. Hopefully these tracker changes won't cause an issue for other tests.
author John Rouillard <rouilj@ieee.org>
date Sat, 09 Nov 2019 00:30:37 -0500
parents 33914dd1160f
children 39b8bc511ed7
comparison
equal deleted inserted replaced
5972:ae35daa5baab 5973:fe334430ca07
32 from roundup import i18n 32 from roundup import i18n
33 from roundup.i18n import _ 33 from roundup.i18n import _
34 from roundup.anypy.strings import is_us, b2s, s2b, us2s, s2u, u2s, StringIO 34 from roundup.anypy.strings import is_us, b2s, s2b, us2s, s2u, u2s, StringIO
35 35
36 from .KeywordsExpr import render_keywords_expression_editor 36 from .KeywordsExpr import render_keywords_expression_editor
37
38 from roundup.cgi.timestamp import pack_timestamp
37 39
38 import roundup.anypy.random_ as random_ 40 import roundup.anypy.random_ as random_
39 try: 41 try:
40 import cPickle as pickle 42 import cPickle as pickle
41 except ImportError: 43 except ImportError:
3088 overlap) 3090 overlap)
3089 3091
3090 def anti_csrf_nonce(self, lifetime=None): 3092 def anti_csrf_nonce(self, lifetime=None):
3091 return anti_csrf_nonce(self.client, lifetime=lifetime) 3093 return anti_csrf_nonce(self.client, lifetime=lifetime)
3092 3094
3095 def timestamp(self):
3096 return pack_timestamp()
3097
3093 def url_quote(self, url): 3098 def url_quote(self, url):
3094 """URL-quote the supplied text.""" 3099 """URL-quote the supplied text."""
3095 return urllib_.quote(url) 3100 return urllib_.quote(url)
3096 3101
3097 def html_quote(self, html): 3102 def html_quote(self, html):

Roundup Issue Tracker: http://roundup-tracker.org/