Create a active_user_from_url decorator
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 5 Dec 2012 12:37:19 +0000 (13:37 +0100)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 5 Dec 2012 12:37:19 +0000 (13:37 +0100)
commitad7420281cdaf5846d8754a29e5006bde82d87f9
tree49342c9f20af9cf024901f2d26c3b608687f428a
parent2222278dcdf70a1dbcba0e5955344259d0697752
Create a active_user_from_url decorator

This can be used for URL patterns containing a <user> element. It will look
up the corresponding user among all active users and return a 404 NOT FOUND
page if there is no such active user. It then passes the User() instance as
url_user keyword argument to the decorated view function.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
mediagoblin/decorators.py