Revision 9a94c0f1

b/snf-astakos-app/astakos/im/util.py
231 231
    return response
232 232

  
233 233

  
234
class lazy_string(object):
235
    def __init__(self, function, *args, **kwargs):
236
        self.function = function
237
        self.args = args
238
        self.kwargs = kwargs
239

  
240
    def __str__(self):
241
        if not hasattr(self, 'str'):
242
            self.str = self.function(*self.args, **self.kwargs)
243
        return self.str
244

  
245

  
246
def reverse_lazy(*args, **kwargs):
247
    return lazy_string(reverse, *args, **kwargs)
248

  
249

  
250 234
def reserved_email(email):
251 235
    return AstakosUser.objects.user_exists(email)
252 236

  

Also available in: Unified diff