Mercurial > public > sg101
changeset 644:d63c8ccc29a7
Get home page slideshow images from MEDIA, not STATIC.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 10 Mar 2013 13:09:00 -0500 |
parents | 081a88b3bfc8 |
children | 99f7917702ca |
files | .hgignore core/templatetags/core_tags.py static/slideshow/425.JPG static/slideshow/casino66.jpg static/slideshow/chum.jpg static/slideshow/friasivan.jpg static/slideshow/image-1.jpg static/slideshow/image-2.jpg static/slideshow/image-3.jpg static/slideshow/image-4.jpg static/slideshow/image-5.jpg static/slideshow/insect.jpg static/slideshow/jeffdavepaul.jpg static/slideshow/lehos_zps7d7f75a5.jpg static/slideshow/lorenzo.jpg static/slideshow/slack3.jpg static/slideshow/spco.jpg static/slideshow/spra001.jpg static/slideshow/ssiv.jpg static/slideshow/wronski.jpg |
diffstat | 20 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Sun Mar 10 12:47:21 2013 -0500 +++ b/.hgignore Sun Mar 10 13:09:00 2013 -0500 @@ -12,6 +12,7 @@ media/downloads media/podcast media/potd +media/slideshow media/smiley celerybeat-schedule sg101/xapian_index
--- a/core/templatetags/core_tags.py Sun Mar 10 12:47:21 2013 -0500 +++ b/core/templatetags/core_tags.py Sun Mar 10 13:09:00 2013 -0500 @@ -229,11 +229,11 @@ def slideshow_images(): """Randomly choose images from a pool for a slideshow.""" - slides_dir = os.path.join(settings.STATIC_ROOT, 'slideshow', '*') + slides_dir = os.path.join(settings.MEDIA_ROOT, 'slideshow', '*') slides = [os.path.basename(s) for s in glob.glob(slides_dir)] if len(slides) >= 5: slides = random.sample(slides, 5) - slides = ['%sslideshow/%s' % (settings.STATIC_URL, s) for s in slides] + slides = ['%sslideshow/%s' % (settings.MEDIA_URL, s) for s in slides] return { 'slides': slides,