Fixed a tiny error in hackergotchi filename creator, applying via the web form is working now.
This commit is contained in:
parent
cb90ae2092
commit
c57643d76c
|
@ -21,8 +21,6 @@ class Handler:
|
||||||
def __set_values(self):
|
def __set_values(self):
|
||||||
|
|
||||||
author = Authors.objects.get(author_id = self.id)
|
author = Authors.objects.get(author_id = self.id)
|
||||||
print author
|
|
||||||
print author.author_id
|
|
||||||
|
|
||||||
if not author.is_approved:
|
if not author.is_approved:
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -90,7 +90,7 @@ def handle_uploaded_file(f):
|
||||||
if not f.name: return False
|
if not f.name: return False
|
||||||
#lets create a unique name for the image
|
#lets create a unique name for the image
|
||||||
t = str(time.time()).split(".")
|
t = str(time.time()).split(".")
|
||||||
img_name = t[0] + t[1] + f.name.split(".")[1]
|
img_name = t[0] + t[1] + '.' +f.name.split(".")[1]
|
||||||
f.name = img_name
|
f.name = img_name
|
||||||
path = os.path.join(settings.FILE_UPLOAD_TEMP_DIR, f.name)
|
path = os.path.join(settings.FILE_UPLOAD_TEMP_DIR, f.name)
|
||||||
|
|
||||||
|
|
|
@ -90,6 +90,6 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
)
|
)
|
||||||
|
|
||||||
FILE_UPLOAD_TEMP_DIR = os.path.join(BASEPATH, 'templates/tmp')
|
FILE_UPLOAD_TEMP_DIR = os.path.join(BASEPATH, 'gezegen/tmp')
|
||||||
MAIN_PATH = os.path.join(BASEPATH, 'gezegen')
|
MAIN_PATH = os.path.join(BASEPATH, 'gezegen')
|
||||||
BASE_URL = 'http://127.0.0.2'
|
BASE_URL = 'http://127.0.0.2'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user