Django snippets: Middleware to detect visitors who arrived from a search engine

22 Jul 2009
@classmethod def parse_search(cls, url): """ Extract the search engine, domain, and search term from `url` and return them as (engine, domain, term). For example, ('Google', 'www.google.co.uk', 'django framework').

via Django snippets: Middleware to detect visitors who arrived from a search engine.