1👍
✅
Try to use single quotes (‘) and used the reverse function to retrieve the URL for the ‘home’ view.
from django.http import HttpResponse
from django.urls import reverse
def search(request):
home_url = reverse('home')
return HttpResponse(f'<a href="{home_url}">home</a>')
Source:stackexchange.com