বাংলায় জ্যাঙ্গো

এটা get_absolute_url() ম্যাথড কে কল করবে

from django.shortcuts import redirect
from simple_blog.models import Post

def post_view(request, post_id):
    post = Post.objects.get(pk=post_id)
    return redirect(post)
    # equivalent to: return HttpResponseRedirect(post.get_absolute_url())

 

Leave a Reply

avatar
  Subscribe  
Notify of