Sunday, February 9, 2014

Passing ahref link as a variable to a view

i have a django page that loads urls as such 

Please select server to create shredder job

http://s.com/ 
http://munene.com/ 
http://faith.com/ 
http://one.com/ 

when a user selects a href, it loads a new page x.
I want to pass the url link to the next page (as a variable that can be used to search for contents to load) and have been scratching my ears on how to do this with no success

my href is                         
<a href="/test/" value="{{ server }}" id ='server_url' _name='server_url'>{{ server }}</a> <br/>

I have tried request.POST (but my form id loaded as GET )
i also tried request.GET.get['server_url']


Any ideas?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/612e01f1-ed62-4be4-bf06-80da8be59c8d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment