Jezzy Grey


class from descriptionSun, 19 Feb 2023

django framework. views file Create several classes that implement the task of tearing text in two fields entered by the user. These forms must be passed to the idnex html template

from django.http import HttpResponse from django.shortcuts import render # Create your views here. def index(request): return render(request,"index.html") def analyze(request): djtext = request.POST.get('text','default') removepunc = request.POST.get('removepunc','off') fullcaps = request.POST.get('fullcaps','off') newlineremover = request.POST.get('newlineremover','off') extraspaceremover = request.POST.get('extraspaceremover','off') charcounter = request.POST.get('charcounter','off') #check which checkbox is on if removepunc == 'on': punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~''' analyzed = "" for char in djtext: if char not in punctuations: analyzed = analyzed + char params = {'purpose':'

Questions about programming?Chat with your personal AI assistant