diff --git a/spa/models/Mix.py b/spa/models/Mix.py index ff9706a..468b7ab 100644 --- a/spa/models/Mix.py +++ b/spa/models/Mix.py @@ -2,6 +2,7 @@ from django.contrib.sites.models import Site from django.db.models.signals import post_save from django.dispatch import Signal, receiver import os +import rfc822 from core.utils import url from datetime import datetime from django.db import models @@ -72,6 +73,10 @@ class Mix(_BaseModel): #return 'media/%s/' % self.local_file.name return '/audio/stream/%d' % self.id + def get_date_as_rfc822(self): + return rfc822.formatdate(rfc822.mktime_tz(rfc822.parsedate_tz(self.upload_date.strftime("%a, %d %b %Y %H:%M:%S")))) + + @classmethod def get_listing(cls, listing_type, user=None): queryset = None diff --git a/spa/podcast.py b/spa/podcast.py index 16dfdd8..c0bbcd3 100644 --- a/spa/podcast.py +++ b/spa/podcast.py @@ -8,7 +8,7 @@ def get_default_podcast(request): request, 'inc/xml/podcast.xml', {'items': mixes}, - content_type='text/xml' + content_type='text/xml; charset=utf-8' ) diff --git a/static/js/app/views/mix.js b/static/js/app/views/mix.js index 7cf4ed4..ff0c022 100644 --- a/static/js/app/views/mix.js +++ b/static/js/app/views/mix.js @@ -286,4 +286,4 @@ window.MixCreateView = DSSEditableView.extend({ imageChanged:function (evt) { this.sendImage = true; } -}); \ No newline at end of file +}); diff --git a/static/js/app/views/release.js b/static/js/app/views/release.js index 427f03c..793fa31 100644 --- a/static/js/app/views/release.js +++ b/static/js/app/views/release.js @@ -52,7 +52,9 @@ var ReleaseListView = Backbone.View.extend({ var date = s.match(/^(\w{3})[ ](\d{1,2}),[ ](\d{4})$/); var m = monthNames[date[1]]; var d = String(date[2]); - if (d.length == 1) {d = "0" + d;} + if (d.length == 1) { + d = "0" + d; + } var y = date[3]; return '' + y + m + d; }, @@ -88,6 +90,9 @@ var ReleaseItemView = Backbone.View.extend({ }, render:function () { $(this.el).html(this.template({"item":this.model.toJSON()})); + if (com.podnoms.utils.isEmpty(this.model.get('release_image'))){ + $('#release-image-div', this.el).remove(); + } return this; } }); diff --git a/templates/inc/xml/podcast.xml b/templates/inc/xml/podcast.xml index 4fe8fce..4745c06 100644 --- a/templates/inc/xml/podcast.xml +++ b/templates/inc/xml/podcast.xml @@ -1,14 +1,22 @@ - + 60 - Deep South Sounds Podcast Deep House Music with a Cork twist - http://www.deepsouthsounds.com/podcast/ + en-IE All your muzik is belong to us + + http://static.deepsouthsounds.com/img/dss-large.png + Deep South Sounds Podcast + http://www.deepsouthsounds.com + 200 + 200 + Deep House Music with a Cork twist + Deep House Music with a Cork twist Deep South Sounds Deep House Music with a Cork twist @@ -16,33 +24,24 @@ Deep South Sounds admin@deepsouthsounds.com - - - + no {% for item in items %} - - {{ item.title }} - Episode author - {{ item.title }} - {{ item.description }} - - - item.get_download_url - - {{ item.get_download_url }} - - - deep, house, music - + + {{ item.title }} + Episode author + {{ item.title }} + {{ item.description|escape }} + + no + + {{ item.get_download_url }} + {{ item.get_date_as_rfc822 }} + 100 + deep, house, music + {% endfor %} - \ No newline at end of file + diff --git a/templates/views/ReleaseItemView.html b/templates/views/ReleaseItemView.html index 32566b9..979df6f 100644 --- a/templates/views/ReleaseItemView.html +++ b/templates/views/ReleaseItemView.html @@ -7,13 +7,13 @@ <%= item.release_title %> -
+
<%= item.release_description %>
-
+
<%= item.embed_code %>