Created
November 1, 2012 03:52
-
-
Save ncoghlan/3991579 to your computer and use it in GitHub Desktop.
Workaround github's broken comment system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Github won't let me comment on https://github.com/pculture/unisubs/commit/e41f74fa5a17573b08001cc1431b615abca930ba | |
so just saving this here for now. | |
unisubs is hitting the double import problem that is caused by Django's old default project layout and management script, which creates a broken Python import configuration. Django's default behaviour has been fixed (https://docs.djangoproject.com/en/dev/releases/1.4/#updated-default-project-layout-and-manage-py) but projects using the old layout may still see the issue. | |
The only reliable solution is to fix the layout to avoid the broken configuration that allows the same module to be imported under two different names. The simplest way to do this is to: | |
1. Remove any sys.path manipulation from manage.py | |
2. Ensure that manage.py is *not* inside a Python package (there should *not* be an adjacent __init__.py file) | |
3. Adjust imports as needed for any changed made in steps 1 and 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment