New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre_argument_parsing/post_argument_parsing hooks #194

Closed
derks opened this Issue May 30, 2013 · 1 comment

Comments

Projects
None yet
1 participant
@derks
Member

derks commented May 30, 2013

Title original referenced 'pre_dispatch/post_dispatch' hooks.

There are a lot of situations where I want to access app.pargs.foo after arguments are parsed, but before the actually logic of the app starts in app.run(). The pre_run hook happens before arguments are parsed, and the post_run hook happens after the logic of the app happens (when using application controllers). Having a pre_dispatch hook would allow us to access app.pargs.foo before application logic runs.

@derks

This comment has been minimized.

Show comment
Hide comment
@derks

derks May 30, 2013

Member

Might also be more appropriate, and easier to implement to have a pre_argument_parsing, post_argument_parsing hook instead. Dispatch is actually the 'running' of the app, so pre_run/post_run are pretty accurate for that. pre/post argument parsing would happen in the middle of run/dipatch.

Member

derks commented May 30, 2013

Might also be more appropriate, and easier to implement to have a pre_argument_parsing, post_argument_parsing hook instead. Dispatch is actually the 'running' of the app, so pre_run/post_run are pretty accurate for that. pre/post argument parsing would happen in the middle of run/dipatch.

@ghost ghost assigned derks Jun 8, 2013

derks added a commit that referenced this issue Jun 8, 2013

@derks derks closed this Jun 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment