I am using Userena and I am trying to capture URL parameters and get them to my form but I\'m lost how to do this.
What I would like to do in my template is:
You can access the url in your template using -
{% request.get_full_path %}
(see the docs for more info).
However if you just want to get the planslug variable then pass it from the view to the template and access it in the template (it's available in the view because it's a named parameter in the url) -
def signup(request, planslug=None):
#
render(request, 'your_template.html', {'planslug':planslug}
and then in your template you get it with -
{% planslug %}
If you're using class based views then you'll need to override get_context_data to add the planslug variable to your context before you pass it to the template-
def get_context_data(self, *args, **kwargs):
context = super(get_context_data, self).get_context_data(*args, **kwargs)
context['planslug'] = self.kwargs['planslug']
return context