-
Notifications
You must be signed in to change notification settings - Fork 38
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
What is project_root
?
#447
Comments
That's how it's used on The pattern here is: just throw it in
Don't forget: |
The first hit on Google for
And then this alternative:
I'm open to adopting that line of thinking: "project" is a metaphor, and we should prefer non-metaphorical names. Maybe for our case we have something like:
|
Maybe |
(In any case, |
This lacks details. I can not say if names are good or bad, because as you see, for the the usage of
|
Also, I'm against
|
#438 gone wrong, and I think it is a miscommunication. The conflicting point for is is that
project_root
is explained as "junk drawer" for importable modules, "catchall for files that don’t belong in your actual URL hierarchy" @ http://aspen.io/project_root/The actual usage of it in Gratipay is to point to a root of the root of the project to find all other modules. Kind of crippled
sys.path
for running without virtualenv, so thatimport gratipay
may succeed. IMHO for that aimport_paths
name better reflects the use name. More than that - it is a set of paths hardcoded for every application.Now how to set it. The so-called
project_root
is also used for storing configuration files. This is double purpose and that's why it is so hard to decouple. Clearly, to find outimport_paths
they need to be defined somewhere, soaspen
application (or wsgi entrypoint) needs to get the idea of where the settings are located.The discovery mechanism for settings location should be the primary focus for unwinding the complexity issue with
project_path
. Currently, there is no discovery that I know of. Theproject_root
is used to locate someconfigure-aspen.py
(which needs to containimport_paths
) andproject_root
is specified on command line or hardcoded into WSGI scripts.The correct way is to specify only one file - config or setting file in command line, provide sane default if there is no such file, and inside of that file, specify relative paths to all other dirs and files, such as
mime.types
.Does that sound good?
The text was updated successfully, but these errors were encountered: