def _is_internal_request(domain, referer):
    # Different subdomains are treated as different domains.
    return referer is not None and re.match("^https?://%s/" % re.escape(domain), referer)
Test that translations work.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/middleware/common.py/_is_internal_request--crossover with--dataset/ETHPy150Open BergWerkGIS/QGIS-CKAN-Browser/CKAN-Browser/test/test_translations.py/SafeTranslationsTest.test_qgis_translations