Commits

Robert Myers  committed 36091e2

adding a CANNULA_MEDIA_ROOT variable in init

  • Participants
  • Parent commits 66ba0a8
  • Branches worker

Comments (0)

Files changed (2)

File cannula/__init__.py

+import os
+
+CANNULA_DIR = os.path.abspath(os.path.dirname(__file__))
+CANNULA_MEDIA_ROOT = os.path.join(CANNULA_DIR, 'static')

File example/sampleproject/settings.py

 
 # Absolute filesystem path to the directory that will hold user-uploaded files.
 # Example: "/home/media/media.lawrence.com/"
-import os
 import cannula
-CANNULA_DIR = os.path.dirname(cannula.__file__)
-MEDIA_ROOT = os.path.join(CANNULA_DIR, 'static')
+
+MEDIA_ROOT = cannula.CANNULA_MEDIA_ROOT
 
 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
 # trailing slash if there is a path component (optional in other cases).