Comments (2)
"Enforcement", "bad", "annoying", "really bad".... May I suggest to be a little more polite when phrasing your bug reports?
And no, regarding settings there is no such assumption (I think) that project
must be a directory underneath the buildout directory. It is used as part of the settings dotted path that gets passed to django. Django then tries to import it. So as long as project.settings
is importable, Django doesn't mind if it is a directory underneath the buildout, a develop egg in src/
or a downloaded egg from somewhere.
The only assumption is that there currently is a check in the main code that warns you if there's no directory named after the project, suggesting that you run bin/django startproject projectname
in that case. Seems reasonable to leave that in place as that's good for backwards compatibility with the previous default.
Settings are already quite flexible. I have a project lizard5
with settings settings.production
and settings.development
and so. They're simply concatenated. So you can have project = my_project.something
, for instance.
And for corner cases where you don't have a regular main django project (where-ever you may import it from) with an importable settings (sub)module there's the dotted-settings-path
option, which you can use. This is probably only necessary when you don't have your settings inside an importable python module, as far as I could see. See also https://github.com/rvanlaar/djangorecipe/issues?q=label%3Aabsolutesettingspath+is%3Aclosed . I closed those related tickets as dotted-settings-path
seemed to solve it once and for all :-)
A change that might be handy is to have project
to default to an empty string instead of "project"
, as it is now, in case dotted-settings-path
is specified. The advantage is that you wouldn't get a warning about a non-existing project directory. Would that help?
from djangorecipe.
Regarding politeness, I'm sorry, English is not my native language, and my vocabulary of English words is quite poor, so I just try to express my point of view with very limited set of words. My intentions is to make djangorecipe better, than it is now.
And no, regarding settings there is no such assumption (I think) that project must be a directory underneath the buildout directory.
Actually I don't really know what is the purpose of project
. According to this
djangorecipe/src/djangorecipe/recipe.py
Lines 72 to 78 in e0d288d
A change that might be handy is to have project to default to an empty string instead of "project", as it is now, in case dotted-settings-path is specified. The advantage is that you wouldn't get a warning about a non-existing project directory. Would that help?
Yes, that would help.
Currently documentation says: The options below are for older projects or special cases mostly:
, dotted-settings-path
falls under this statement. This sounds like dotted-settings-path
can be removed at any time like projectegg
was.
Regarding backwards compatibility, removal of projectegg
broke all my projects that use djangorecipe
.
I think, project
option is misleading and currently it is just an artefact left for backwards compatibility. settings
is also quite confusing, it is a python path to settings module, but without project
package name.
I think the right fix is to do a backwards incompatible change, like with projectegg
, where project
is removed and settings
is replaced with dotted-settings-path
.
Otherwise, removing warning about non-existing project directory would be also ok, with explanation in documentation, that dotted-settings-path = project + '.' + settings
, where project
is directory name under buildout root and settings
is dotted settings path without project
package.
Currently, just reading documentation I can't really understand what project
and settings
options are I could only fully understand it by reading sources.
from djangorecipe.
Related Issues (20)
- Buildout is pulling package twice HOT 2
- In the django wsgi script, setup_environ is deprecated, should be replaced by os.environ['DJANGO_SETTINGS_MODULE'] HOT 4
- Update Documentation to newest Django version HOT 1
- Project generation HOT 4
- django 1.5: DeprecationWarning: The 'execute_manager' function is deprecated HOT 7
- Add templates for 1.4 and 1.5 for the startproject stuff HOT 2
- Allow custom path to wsgi application HOT 4
- Allow parameter for custom base source directory HOT 5
- How do I run the tests? HOT 3
- django-configurations support requires custom mange.py file HOT 2
- Rename deploy_script_extra to deploy-script-extra HOT 1
- Unable to deploy with recent Gunicorn HOT 11
- Djangorecipe always forces the download of latest packages HOT 8
- Deployment settings HOT 4
- Unable to generate project with bin/django startproject projectname HOT 2
- An internal error occurred due to a bug in either zc.buildout or in a recipe being used HOT 2
- djangorecipe cannot install django HOT 1
- uwsgi configuration hints to deploy django build with djangorecipe HOT 3
- Support for Python3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from djangorecipe.