-
Notifications
You must be signed in to change notification settings - Fork 78
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
Unneeded DATA_DIR kludge #349
Comments
Unfortunately Any suggestion of PoC on how to improve the current code is obviously welcome! |
Django 2.2 has been out for about three months now. It's already up to 2.2.2. For the DCMS project I'm working on now, I'm reorganizing it to look more like the cookiecutter layout. |
Unfortunately we must follow the Django CMS releases when it comes to Django support |
I wasn't suggesting using cookicutter-django itself, merely the cookiecutter tech it's built on. It would be a significant change, though. |
Is Also, what's the use of the |
@bluegrounds |
Sounds awesome. What about |
we will revise this upon the refactoring of the settings generation |
I got my project generated, and I'm looking at the diffs between it and a Django-CMS 3.5 project I set up a year ago, and there's this weirdness at the start of
settings.py
:There's a few problems here:
1. You can't put code in front of the file's docstring. Python will ignore it; it is not placed in the module's
__doc__
property:Worse, while Python itself ignores those strings, other tools such as epydoc consider strings after variable assignments to be docstrings for those variables (e.g. for documenting module constants).
2.
DATA_DIR
has the same value asBASE_DIR
, andBASE_DIR
's algorithm is more robust.DATA_DIR
should be set equal toBASE_DIR
.3. Setting
gettext
to a no-op without documenting why, when we should be trying to import the proper gettext function, and only setting the no-op version if the import fails or something.4. The
os
module is imported twice.Corrected version:
The text was updated successfully, but these errors were encountered: