diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-05-08 14:35:31 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2013-05-08 14:35:31 -0500 |
commit | 3810309443899e92d640fb0c893018ef82b786ee (patch) | |
tree | f877df48ffde7049320122292f68fe3608481e26 /mediagoblin/app.py | |
parent | f65bf8983611b18ec3a6a042404c50b8558529df (diff) | |
download | mediagoblin-3810309443899e92d640fb0c893018ef82b786ee.tar.lz mediagoblin-3810309443899e92d640fb0c893018ef82b786ee.tar.xz mediagoblin-3810309443899e92d640fb0c893018ef82b786ee.zip |
The beginning of context hooks.
Not the working solution, but getting there conceptually. Basically
we'll have a key with the view and the template as a tuple which is
the context hook that anyone can attach to.
However, some changes have still to be made:
- The unit test doesn't work yet and contains a set_trace ;)
- We'll probably switch the "view" component from being the callable
to the "urlgen"'able name per Elrond's suggestion
- Found a bug in unit tests related to running custom apps for
different configs... hm. I need to fix this!
Nonetheless, making progress.
This commit sponsored by... wait a minute... Christopher Webber?!
Diffstat (limited to 'mediagoblin/app.py')
-rw-r--r-- | mediagoblin/app.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mediagoblin/app.py b/mediagoblin/app.py index bf0e0f13..dc2900a9 100644 --- a/mediagoblin/app.py +++ b/mediagoblin/app.py @@ -201,6 +201,9 @@ class MediaGoblinApp(object): exc.get_description(environ))(environ, start_response) controller = endpoint_to_controller(found_rule) + # Make a reference to the controller on the request... + # used for lazy context modification + request.controller = controller # pass the request through our meddleware classes try: |