Skip to content
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

Factor out PROJECT_PATH #4104

Closed
benjaoming opened this issue Jul 15, 2015 · 1 comment
Closed

Factor out PROJECT_PATH #4104

benjaoming opened this issue Jul 15, 2015 · 1 comment

Comments

@benjaoming
Copy link
Contributor

The notion of PROJECT_PATH was tied to the old one-dimensional single-dir-based distribution where the kalite package was in limbo between being a django app and a django project.

It didn't really make itself understandable, neither, because the project was either the top-most level / or the /kalite/ dir.

Everywhere that PROJECT_PATH is used, it reveals some level of implicit structure. We need to go through all the occurrences and replace them with the new settings strategy #4054

On a secondary note, PROJECT_PATH was actually never a "setting", it was never supposed to be changed.

✗ ack-grep --python PROJECT_PATH kalite

kalite/playlist/management/commands/checkplaylistentries.py
22:        all_playlists = json.load(open(os.path.join(settings.PROJECT_PATH, 'playlist/playlists.json')))

kalite/basetests/tests.py
6:PROJECT_PATH = os.path.realpath(os.path.join(THIS_PATH, "..", ".."))
11:        os.path.join(PROJECT_PATH),
12:        os.path.join(PROJECT_PATH, "kalite"),
13:        os.path.join(PROJECT_PATH, "python-packages"),
315:        content_path = os.path.realpath(os.path.join(PROJECT_PATH, "content"))
320:        khan_path = os.path.realpath(os.path.join(PROJECT_PATH, "data", "khan"))
325:        khan_path = os.path.realpath(os.path.join(PROJECT_PATH, "data", "khan"))
351:        scripts_path = os.path.realpath(os.path.join(PROJECT_PATH, "scripts"))

kalite/distributed/management/commands/apacheconfig.py
34:            "project_path": settings.PROJECT_PATH,

kalite/distributed/management/commands/nginxconfig.py
76:        self.stdout.write(config_template % {"root_path": os.path.realpath(settings.PROJECT_PATH + "/../"),

kalite/distributed/management/commands/setup.py
359:        # call_command("clean_pyc", interactive=False, verbosity=options.get("verbosity"), path=os.path.join(settings.PROJECT_PATH, ".."))
468:                        os.path.join(settings.PROJECT_PATH, "..", "bin", kalite_executable))
471:                        os.path.join(settings.PROJECT_PATH, "..", "bin", "windows", "kalite.bat"))

kalite/distributed/management/commands/screenshots.py
184:            self.output_path = os.path.join( os.path.realpath(os.path.join(settings.PROJECT_PATH, '..')),

kalite/distributed/management/commands/initdconfig.py
84:            executable_path = os.path.abspath(os.path.join(settings.PROJECT_PATH, "..", "bin", "kalite"))
85:            cwd = settings.PROJECT_PATH

@benjaoming benjaoming self-assigned this Jul 15, 2015
@benjaoming benjaoming added this to the 0.15.0 milestone Jul 15, 2015
@aronasorman aronasorman modified the milestones: 0.16.0, 0.15.0 Sep 1, 2015
@benjaoming benjaoming modified the milestones: 0.17.0, 0.16.0 Mar 1, 2016
@benjaoming benjaoming modified the milestones: 0.17.0, 0.17.1 Mar 19, 2017
benjaoming pushed a commit to benjaoming/ka-lite that referenced this issue Apr 4, 2017
@benjaoming
Copy link
Contributor Author

Fixed in #5429

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

No branches or pull requests

2 participants