cleanup static

This commit is contained in:
j 2011-10-28 00:15:37 +02:00
commit c544084c8e
29 changed files with 22 additions and 94 deletions

View file

@ -4,6 +4,7 @@ from __future__ import division, with_statement
import os
import sys
import shutil
import time
import thread
@ -72,6 +73,18 @@ def update_static():
with open(pandora_json, 'w') as f:
json.dump(sorted(js), f, indent=2)
for size in (16, 64, 256):
pandora = os.path.join(settings.STATIC_ROOT, 'png/pandora/icon%d.png'%size)
image = os.path.join(settings.STATIC_ROOT, 'png/icon%d.png'%size)
if not os.path.exists(image):
shutil.copyfile(pandora, image)
for size in (256, 1024):
pandora = os.path.join(settings.STATIC_ROOT, 'png/pandora/logo%d.png'%size)
image = os.path.join(settings.STATIC_ROOT, 'png/logo%d.png'%size)
if not os.path.exists(image):
shutil.copyfile(pandora, image)
def init():
load_config()
thread.start_new_thread(reloader_thread, ())