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
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)
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
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(
4 matches
Mail list logo