What code was responsible for generating a view
Project description
more.whytool: find out what code was responsible for generating a response
more.whytool lets you create a tool that tells you what view code was responsible for handling a request.
To create such a tool you do the following, for instance in the main.py of your project:
from more.whytool import why_tool from .someplace import SomeApp def my_why_tool(): SomeApp.commit() why_tool(SomeApp)
where SomeApp is the application you want to query, typically the root application of your project.
Now you need to hook it up in setup.py to you can have the tool available:
entry_points={ 'console_scripts': [ 'morewhytool = myproject.main:my_why_tool', ] },
After you install your project, you should now have a morewhytool tool available. You can give it requests:
$ morewhytool /some/path
It tells you:
What path directive handled the request.
What view directive handled the request.
CHANGES
0.5 (2017-01-13)
Initial public release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file more.whytool-0.5.tar.gz
.
File metadata
- Download URL: more.whytool-0.5.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8172082ef036cc6eb410ae0ebcc1d6c9ba1024e060184b0e76676e4114d730fe |
|
MD5 | 5cf12c2423dd4bbc0a64d8022a14689e |
|
BLAKE2b-256 | f1958d329796d7784ef29281f81ec3717eb04a32741e0c4eff6a6b7f830dba08 |
File details
Details for the file more.whytool-0.5-py3-none-any.whl
.
File metadata
- Download URL: more.whytool-0.5-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebbc301c531cf894c4ed881ad6e2f4f75d7638ba9dfd9cecee06ea28e16223f8 |
|
MD5 | f79f5a70da4a04e772869b7041e373b7 |
|
BLAKE2b-256 | 71e2ae95e02f1e570aac82f5b635a52fec7f9739989862318a8acc005678ee7e |