mirror of
https://github.com/fergalmoran/dss.git
synced 2025-12-22 09:38:18 +00:00
Fixed facebook playlist handling
This commit is contained in:
@@ -2,11 +2,11 @@ from django.conf.urls import patterns, url
|
||||
|
||||
urlpatterns = patterns(
|
||||
'',
|
||||
url(r'^playlist/(?P<slug>[\w\d_.-]+)/$', 'spa.social.views.playlist', name='social_playlist_slug'),
|
||||
url(r'^redirect/mix/(?P<mix_id>\d+)/$', 'spa.social.views.mix', name='social_redirect_mix'),
|
||||
url(r'^redirect/mix/(?P<slug>[\w\d_.-]+)/$', 'spa.social.views.mix', name='social_redirect_mix_slug'),
|
||||
url(r'^mix/(?P<mix_id>\d+)/$', 'spa.social.views.mix', name='social_mix'),
|
||||
url(r'^mix/(?P<slug>[\w\d_.-]+)/$', 'spa.social.views.mix', name='social_mix_slug'),
|
||||
url(r'^playlist/(?P<slug>[\w\d_.-]+)/$', 'spa.social.views.playlist', name='social_playlist_slug'),
|
||||
url(r'^user/(?P<user_id>\w+)/$', 'spa.social.views.user', name='social_user'),
|
||||
url(r'^like/(?P<mix_id>\d+)/$', 'spa.social.views.post_like', name='social_like'),
|
||||
url(r'^$', 'spa.social.views.index', name='social_index')
|
||||
|
||||
@@ -67,14 +67,15 @@ def playlist(request, args):
|
||||
except Playlist.DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
site_url = settings.DEBUG_URL if settings.DEBUG else Site.objects.get_current().domain
|
||||
image = playlist.get_image_url('400x400')
|
||||
playlist_url = playlist.get_absolute_url()
|
||||
playlist_url = "%s%s" % (site_url, playlist.get_absolute_url())
|
||||
default = _getPayload(request)
|
||||
extras = {
|
||||
"description": "Deep South Sounds Playlist by %s" % playlist.user.get_nice_name(),
|
||||
"title": playlist.name,
|
||||
"image_url": image,
|
||||
"playlist_url": 'http://%s%s' % (Site.objects.get_current().domain, playlist_url)
|
||||
"playlist_url": playlist_url
|
||||
}
|
||||
payload = dict(default.items() + extras.items())
|
||||
response = render_to_response(
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
content="Deep house music with a touch of Cork."/>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Facebook index interstitial page</h1>
|
||||
<h1>Facebook interstitial page</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user