from typing import Text from django.http import request from django.shortcuts import redirect, render from lists.models import Item # Create your views here def home_page(request): return render(request=request, template_name='home.html') def view_list(request): items = Item.objects.all() return render(request, 'list.html', {'items': items}) def new_list(request): Item.objects.create(text=request.POST['item_text']) return redirect('/lists/the-only-list-in-the-world/')