I want to know who refers my webpage, so in my models I have:
referrer = models.CharField(max_length=30, default='google',
verbose_name=_('referrer'), help_text=_('Referrer'))
This are the URL's for my page:url(r'^$', app_views.index, name='index_default')and
url(r'^(\w+)/$', app_views.index, name='index_default2')I want to send my referrer parameter to the flash embeddeded within my HTML along flashvars:
< param name="FlashVars" value="referrer={{ referrer }}" /> How should the view look like in order to catch the referrer matched with the regular expression? Something like def index(request):
return render_to_response('index.html',
{
'referrer':referrer,
},
context_instance=RequestContext(request))
in the meta dictionary of request there is a HTTP_REFERER value .. I think that can help you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With