from django.template.loader import render_to_stringdef monthly_challenge(request, month): try: challenge_text = monthly_challenges[month] return render(request, "challenges/challenge.html",{ "text": challenge_text, "month_name": month.capitalize(), }) except: response_data = render_to_string("404.html") return HttpResponseNotFound(response_data) #raise Http404("Inva..