aboutsummaryrefslogtreecommitdiff
path: root/budget/utils.py
diff options
context:
space:
mode:
authorFrédéric Sureau <frederic.sureau@gmail.com>2012-03-28 17:02:02 +0200
committerFrédéric Sureau <frederic.sureau@gmail.com>2012-03-28 17:02:02 +0200
commitc343bf96ea971b7a4d1dd75320f316844a0b3262 (patch)
tree6f0228993d7a437f7ee8eb00ab8e71850832a0aa /budget/utils.py
parent71cb07a92b65579f45152ca09c0597e90fd7b484 (diff)
parent757e86baa1ae3b2bc980fc7a1af2a085b702224c (diff)
downloadihatemoney-mirror-c343bf96ea971b7a4d1dd75320f316844a0b3262.zip
ihatemoney-mirror-c343bf96ea971b7a4d1dd75320f316844a0b3262.tar.gz
ihatemoney-mirror-c343bf96ea971b7a4d1dd75320f316844a0b3262.tar.bz2
Merge branch 'master' of git://github.com/spiral-project/ihatemoney
Diffstat (limited to 'budget/utils.py')
-rw-r--r--budget/utils.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/budget/utils.py b/budget/utils.py
index 52fd151..60337fb 100644
--- a/budget/utils.py
+++ b/budget/utils.py
@@ -1,10 +1,10 @@
import re
-from functools import wraps
import inspect
-from flask import redirect, url_for, session, request
+from flask import redirect
from werkzeug.routing import HTTPException, RoutingException
+
def slugify(value):
"""Normalizes string, converts to lowercase, removes non-alpha characters,
and converts spaces to hyphens.
@@ -32,11 +32,3 @@ class Redirect303(HTTPException, RoutingException):
def get_response(self, environ):
return redirect(self.new_url, 303)
-
-def for_all_methods(decorator):
- """Apply a decorator to all the methods of a class"""
- def decorate(cls):
- for name, method in inspect.getmembers(cls, inspect.ismethod):
- setattr(cls, name, decorator(method))
- return cls
- return decorate