Commits

Luke Plant  committed 2cedd7a

More robust way of creating default member icon

  • Participants
  • Parent commits 7a2d63e

Comments (0)

Files changed (2)

File cciw/forums/views/memberadmin.py

 
         # Copy default member icon
         import shutil
-        shutil.copy("%s/%s" % (settings.STATIC_ROOT, settings.DEFAULT_MEMBER_ICON),
+        shutil.copy("%s/cciw/cciwmain/static/%s" % (settings.PROJECT_ROOT, settings.DEFAULT_MEMBER_ICON),
                     "%s/%s/%s" % (settings.MEDIA_ROOT, settings.MEMBER_ICON_PATH, iconfilename))
         return m
 

File cciw/settings.py

 basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # ../
 parentdir = os.path.dirname(basedir)
 
+PROJECT_ROOT = basedir
+
 DEVBOX = ('webfaction' not in hostname)
 LIVEBOX = not DEVBOX