Finally, create only one symlink to the plugin's static directory inside modoboa's root static directory. It is more compliant with the way django applications work.

close #17
This commit is contained in:
Antoine Nguyen
2011-04-08 17:07:09 +02:00
parent 169365dfb4
commit adbbcfa458
4 changed files with 12 additions and 23 deletions
+3 -15
View File
@@ -256,12 +256,8 @@ class Extension(models.Model):
staticpath = "%s/%s" % (extdir, "static")
if os.path.exists(staticpath):
for d in ['css', 'js']:
subpath = "%s/%s" % (staticpath, d)
if not os.path.exists(subpath):
continue
exec_cmd("ln -s %s %s/static/%s/%s" % (subpath, settings.MODOBOA_DIR,
d, self.name))
exec_cmd("ln -s %s/static %s/static/%s" % \
(extdir, settings.MODOBOA_DIR, self.name))
def off(self):
self.unload()
@@ -274,12 +270,4 @@ class Extension(models.Model):
staticpath = "%s/%s" % (extdir, "static")
if os.path.exists(staticpath):
for d in ['css', 'js']:
subpath = "%s/static/%s/%s" % (settings.MODOBOA_DIR, d, self.name)
exec_cmd("rm -f %s" % subpath)
exec_cmd("rm -r %s/static/%s" % (settings.MODOBOA_DIR, self.name))