Re: Help passing the url

2020-04-10 Thread Irfan Khan
Hi, Need to pass id in function as parameter as well as in that post obj On Tue, 7 Apr 2020 at 1:23 AM, Luka Nik wrote: > How do I pass it exactly? > > On Mon, 6 Apr 2020, 9:41 pm ola neat, wrote: > >> You need to add the id as argument in the function >> >> On Mon, Apr 6, 2020, 19:17 Luka Ni

Re: Help passing the url

2020-04-06 Thread Luka Nik
How do I pass it exactly? On Mon, 6 Apr 2020, 9:41 pm ola neat, wrote: > You need to add the id as argument in the function > > On Mon, Apr 6, 2020, 19:17 Luka Nik wrote: > >> How can I alter this post_detail function: >> >> >> def post_detail(request): >> >> post = get_object_or_404(Post)

Re: Help passing the url

2020-04-06 Thread ola neat
You need to add the id as argument in the function On Mon, Apr 6, 2020, 19:17 Luka Nik wrote: > How can I alter this post_detail function: > > > def post_detail(request): > > post = get_object_or_404(Post) > comments = post.comments.filter(active=True) > new_comment = None > if r

Help passing the url

2020-04-06 Thread Luka Nik
How can I alter this post_detail function: def post_detail(request): post = get_object_or_404(Post) comments = post.comments.filter(active=True) new_comment = None if request.method == 'POST': comment_form = CommentForm(data=request.POST) if comment_form.is_valid(