Help taking input and displaying it.

Currently I am trying to make a task management site which i can add and remove tasks on. Currently to add a task i have to go through admin console Please assist

Code from views.py:

from django.http import HttpResponse
from .models import Task
import datetime
from django.db import models
from django.utils import timezone
from django.template import loader

def tasks(request):
    latest_task = Task.objects.order_by("-publish_date")[:5]
    template = loader.get_template("tasks/index.html")
    context = {
        "latest_task": latest_task,
    }
    return HttpResponse(template.render(context, request))

Code from models.py:

from django.db import models

class Task(models.Model):
    task = models.CharField(max_length=100)
    publish_date = models.DateTimeField("Date Pulished")
    def __str__(self):
        return self.task


When posting code use three backticks to enclose your code within i.e
three backticks
Your code
three backticks

Now, to add and remove tasks you can use Django’s Admin panel

I know i have to use the admin panel i mentioned that but i want to add a way that i can add them without going through the panel.

I suggest you work your way through either (or both) the Official Django Tutorial and the Django Girls Tutorial. They will teach you how that is done in Django, along with a lot of other important concepts as well.