[Django]-Django data passing with a tag or href

6👍

I would try using query parameters in the url string for your anchor tag:

<a href="/internal/my_func?query_name={{ query.name|urlencode }}">{{ query.name }}</a>

Then in your view file you can access it with:

def my_func(request):
    # Get query_name from request
    query = request.GET.get('query_name')

Note that I used request.GET instead of request.Get.

👤ngoue

Leave a comment