Permalink
Browse files

fix for the story_id view

  • Loading branch information...
1 parent 59bde98 commit bf0c59b28ec9cd56bcfa16f3561a24dd79d48601 @f4nt committed Oct 31, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 django_yaba/views.py
View
@@ -106,14 +106,14 @@ def story_id(request, story_id):
try:
posts = get_object_or_404(Story, pk=story_id)
title = posts.slug
- return HttpResponseRedirect("/%s/" % title)
+ return HttpResponseRedirect(posts.get_absolute_url())
except ObjectDoesNotExist:
pass
try:
posts = get_object_or_404(Article, pk=story_id)
title = posts.slug
- return HttpResponseRedirect("/%s/" % title)
+ return HttpResponseRedirect(posts.get_absolute_url())
except ObjectDoesNotExist:
return HttpResponseRedirect("/")

0 comments on commit bf0c59b

Please sign in to comment.