kaputtnik has proposed merging lp:~franku/widelands-website/correct_image_paths
into lp:widelands-website.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~franku/widelands-website/correct_image_paths/+merge/254990
This branch contains two little changes to prevent failures to future image
uploads in wiki and correct the upload_to value for the admin site.
To read why this is needed see:
https://code.launchpad.net/~franku/widelands-website/handle_big_images/+merge/247235/comments/625062
This is part of
https://code.launchpad.net/~franku/widelands-website/handle_great_images/+merge/254988
--
Your team Widelands Developers is requested to review the proposed merge of
lp:~franku/widelands-website/correct_image_paths into lp:widelands-website.
=== modified file 'wlimages/models.py'
--- wlimages/models.py 2015-03-15 18:01:51 +0000
+++ wlimages/models.py 2015-04-01 20:46:34 +0000
@@ -44,7 +44,7 @@
for chunk in image.chunks():
destination.write(chunk)
- im.image = path
+ im.image = "wlimages/%s" % (name)
im.url = url
im.save()
@@ -72,7 +72,7 @@
# Date Fields
date_submitted = models.DateTimeField(_('date/time submitted'), default = datetime.now)
- image = models.ImageField(upload_to="images/")
+ image = models.ImageField(upload_to="wlimages/")
url = models.CharField(max_length=250)
_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help : https://help.launchpad.net/ListHelp