On Wed, 2009-01-28 at 11:49 -0800, Fluoborate wrote: > Hello, > > I would like some suggestions for how to do refbacks in Django. Every > time someone clicks a link that brings them to my site, I want to > record what site referred them. This is done using the HTTP referrer > header. Here are my questions: > > 1. Does the code to do this already exist somewhere (ideally Python > code intended for Django)?
You have access to all the HTTP headers in the request object that is passed to your view. See [1] for details. Once you have that information, recording it somewhere via a middleware or something should be easy. [1] http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.META Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---