In your views.py check “dir” on request.GET object to see what you have got.

 

Sent from Mail for Windows 10

 

From: ratnadeep ray
Sent: 19 May 2020 18:44
To: Django users
Subject: How to pass a variable to views from a template using href ?

 

Hi all, 

 

My requirement is to pass a variable to the view from the template using href. 

 

For example, I have written the following line of code: 

 

<a href="" value="SQL">SQL data</a>

 

So using the above line, can we send the value "SQL" clicking on the link of "SQL data" to the method "execute" written in the views? If not, then what way can I do so? 

 

Thanks. 

 

 

 

 

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7e892826-f4c1-426d-bf9b-1a1b0b2b17be%40googlegroups.com.

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5ec3ddc5.1c69fb81.fa4e6.ace5%40mx.google.com.

Reply via email to