|
|
@@ -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)
|