Compare commits
3 Commits
d2f2ca6ce0
...
89e0dfc0eb
Author | SHA1 | Date | |
---|---|---|---|
89e0dfc0eb | |||
f5c500d149 | |||
449e9e41d1 |
|
@ -148,6 +148,8 @@ IMAGE_PREFIX = 'http://studio.camp/images/'
|
||||||
CONTACT_FROM_EMAIL = 'contact@studio.camp'
|
CONTACT_FROM_EMAIL = 'contact@studio.camp'
|
||||||
CONTACT_TO_EMAIL = ['contact@studio.camp']
|
CONTACT_TO_EMAIL = ['contact@studio.camp']
|
||||||
|
|
||||||
|
DATA_UPLOAD_MAX_MEMORY_SIZE = 150 * 1024 * 1024
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from local_settings import *
|
from local_settings import *
|
||||||
except:
|
except:
|
||||||
|
@ -169,4 +171,4 @@ except NameError:
|
||||||
secret.write(SECRET_KEY)
|
secret.write(SECRET_KEY)
|
||||||
secret.close()
|
secret.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)
|
raise Exception('Please create a %s file with random characters to generate your secret key!' % SECRET_FILE)
|
||||||
|
|
|
@ -68,7 +68,7 @@ class Content(models.Model):
|
||||||
title = models.CharField(max_length=255)
|
title = models.CharField(max_length=255)
|
||||||
header = MarkdownxField(blank=True, null=True, default='')
|
header = MarkdownxField(blank=True, null=True, default='')
|
||||||
body = MarkdownxField(blank=True, null=True, default='')
|
body = MarkdownxField(blank=True, null=True, default='')
|
||||||
teaser = models.TextField(blank=True, null=True, validators=[MaxLengthValidator(200)])
|
teaser = models.TextField(blank=True, null=True, validators=[MaxLengthValidator(250)])
|
||||||
schedule = MarkdownxField(blank=True, null=True, default='')
|
schedule = MarkdownxField(blank=True, null=True, default='')
|
||||||
schedulebutton = models.CharField(db_column='scheduleButton', max_length=255, blank=True, null=True) # Field name made lowercase.
|
schedulebutton = models.CharField(db_column='scheduleButton', max_length=255, blank=True, null=True) # Field name made lowercase.
|
||||||
optbtn2 = models.CharField(db_column='optBtn2', max_length=127, blank=True, null=True) # Field name made lowercase.
|
optbtn2 = models.CharField(db_column='optBtn2', max_length=127, blank=True, null=True) # Field name made lowercase.
|
||||||
|
|
30
patches/photologue-allow-folders.patch
Normal file
30
patches/photologue-allow-folders.patch
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
diff --git a/photologue/forms.py b/photologue/forms.py
|
||||||
|
index 2b05c17..1a69f88 100644
|
||||||
|
--- a/photologue/forms.py
|
||||||
|
+++ b/photologue/forms.py
|
||||||
|
@@ -114,16 +114,6 @@ class UploadZipForm(forms.Form):
|
||||||
|
logger.debug('Ignoring file "{0}".'.format(filename))
|
||||||
|
continue
|
||||||
|
|
||||||
|
- if os.path.dirname(filename):
|
||||||
|
- logger.warning('Ignoring file "{0}" as it is in a subfolder; all images should be in the top '
|
||||||
|
- 'folder of the zip.'.format(filename))
|
||||||
|
- if request:
|
||||||
|
- messages.warning(request,
|
||||||
|
- _('Ignoring file "{filename}" as it is in a subfolder; all images should '
|
||||||
|
- 'be in the top folder of the zip.').format(filename=filename),
|
||||||
|
- fail_silently=True)
|
||||||
|
- continue
|
||||||
|
-
|
||||||
|
data = zip.read(filename)
|
||||||
|
|
||||||
|
if not len(data):
|
||||||
|
@@ -166,7 +156,7 @@ class UploadZipForm(forms.Form):
|
||||||
|
continue
|
||||||
|
|
||||||
|
contentfile = ContentFile(data)
|
||||||
|
- photo.image.save(filename, contentfile)
|
||||||
|
+ photo.image.save(os.path.basename(filename), contentfile)
|
||||||
|
photo.save()
|
||||||
|
photo.sites.add(current_site)
|
||||||
|
gallery.photos.add(photo)
|
Loading…
Reference in New Issue
Block a user