How to get query parameter from URL in Django
When a URL is like
domain/pathname/?q=HelloWorld
and you want to get the value of q in Django view you can use the below-written code.
def profile_page(request):
message = request.GET.get('message')