Adding the 'apps' directory to python path in manage.py, to avoid import problems...
authorLucian Ursu <lucian.ursu@gmail.com>
Sat, 12 Jan 2013 10:24:26 +0000 (12:24 +0200)
committerLucian Ursu <lucian.ursu@gmail.com>
Sat, 12 Jan 2013 10:24:26 +0000 (12:24 +0200)
manage.py

index ba39bf632ca8e5c8383725c466c01b99c4749c0c..a2e98890f75085942019236527eea61518262be8 100755 (executable)
--- a/manage.py
+++ b/manage.py
@@ -3,6 +3,10 @@ import os
 import sys
 
 if __name__ == "__main__":
+    # Making sure we can import each app
+    PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
+    sys.path.append(os.path.join(PROJECT_ROOT, 'karmaworld/apps'))
+
     os.environ.setdefault("DJANGO_SETTINGS_MODULE", "karmaworld.settings.dev")
 
     from django.core.management import execute_from_command_line