Added conf.SAVE parameter to select if you want the database involved or not

This commit is contained in:
Felipe Martín 2013-05-27 16:13:53 +02:00
parent 5fa96a08bb
commit 1c27064369
2 changed files with 33 additions and 29 deletions

View File

@ -1,5 +1,7 @@
DEBUG = False
SAVE = True
###
# TEXTURES
###

View File

@ -31,6 +31,7 @@ for path in conf.TEXTURES_PATHS:
# GO!
for f in listdir(path):
if isfile(join(path, f)):
if conf.SAVE:
# Copy original image
destiny_path = '../../minecraftcodex/database/static/%s' % join(path, f).\
replace('jarfile/', '')
@ -56,6 +57,7 @@ for path in conf.TEXTURES_PATHS:
)
)
if conf.SAVE:
for texture in TEXTURES:
try:
item = Texture.objects.get(