diff options
Diffstat (limited to 'postinstall')
-rwxr-xr-x | postinstall | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/postinstall b/postinstall index 28f8e4e..3132c08 100755 --- a/postinstall +++ b/postinstall @@ -10,5 +10,10 @@ admindir = os.path.dirname(django.contrib.admin.__file__) mediadir = os.path.join(admindir, 'media') staticlink = os.path.join('static', 'admin') -if not os.path.islink(staticlink): +if os.path.exists(staticlink): + if not os.path.islink(staticlink): + print "Removing", staticlink + os.unlink(staticlink) + os.symlink(mediadir, staticlink) +else: os.symlink(mediadir, staticlink) |