Get_context_data only user’s data

Can’t render any data from model
Here is views.py file

from django.shortcuts import render

from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.urls import reverse_lazy
from django.contrib.auth.views import LoginView
from django.contrib.auth.mixins import LoginRequiredMixin
from . models import Task


class CustomLoginView(LoginView):
    template_name = 'base/login.html'
    fields = ['title', 'description', 'complete']
    redirect_authenticated_user = True

    def get_success_url(self):
        return reverse_lazy('tasks')


class TaskList(LoginRequiredMixin, ListView):
    model = Task
    context_object_name = 'tasks'

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['color'] = 'red'

        return context


class TaskDetail(LoginRequiredMixin, DetailView):
    model = Task
    context_object_name = 'task'
    template_name = 'base/task.html'


class TaskCreate(LoginRequiredMixin, CreateView):
    model = Task
    fields = ['title', 'description', 'complete']
    success_url = reverse_lazy('tasks')


class TaskUpdate(LoginRequiredMixin, UpdateView):
    model = Task
    fields = ['title', 'description', 'complete']
    success_url = reverse_lazy('tasks')


class TaskDelete(LoginRequiredMixin, DeleteView):
    model = Task
    context_object_name = 'task'
    success_url = reverse_lazy('tasks')

models.py

from django.db import models
from django.contrib.auth.models import User


class Task(models.Model):
    user = models.ForeignKey(
        User, on_delete=models.CASCADE, blank=True, null=True)
    title = models.CharField(max_length=200)
    description = models.TextField(null=True, blank=True)
    complete = models.BooleanField(default=False)
    created = models.DateTimeField(auto_now_add=True)

    def __str__(self):
        return self.title

    class Meta:
        ordering = ['complete']

And template task_list.html

{% if request.user.is_authenticated %}
        <p> {{ request.user }}</p> 
        #</a href="{% url 'logout' %}">Logout</a/>new users can only put 2 links in a post.
        
{% else %}
#<a href="{% url 'login' %}">Login</a>new users can only put 2 links in a post.



{% endif %}

<hr>


<h1>My to do list {{color}} </h1> 
<td><a href="{% url 'task-create'  %}">Add</a> </td>



<table>
    <tr>
        <th>Items</th>
        <th></th>

    </tr>
        {%for task in tasks%}
         <tr>
        <td>{{task.title}}</td>
        <td><a href="{% url 'task' task.id %}">View</a> </td>
        
        <td><a href="{% url 'task-update' task.id %}">Edit</a> </td>
        <td><a href="{% url 'task-delete' task.id %}">Del</a> </td>
        {%empty%}
        <h3>No items in a list </h3>
         </tr>
        {%endfor%}

can’t render specific data from user ,any help will be appreciated

First a side note, it should be backtick characters - ` not apostrophies - ' surrounding your code. I’ve gone ahead and fixed them for your initial post here. (You also had a couple cases of spaces within those lines, those won’t work either.)

Briefly, it doesn’t look like you’re assigning the current user to the user field within the model when you create the Task. See the docs and the examples at Creating forms from models | Django documentation | Django

In terms of doing this within a class-based view, you’re likely to want to override the form_valid method of the class. See the docs and examples at Form handling with class-based views | Django documentation | Django