This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from funfactory.middleware import LocaleURLMiddleware | |
from django.conf import settings | |
class ExceptionalLocaleURLMiddleware(LocalURLMiddleware): | |
""" | |
Replacement for funfactory.middleware.LocaleURLMiddleware that supports excluding | |
specific paths from getting redirected if a lang param is present in the request. | |
""" | |
def process_request(self, request): | |
if 'lang' in request.GET and request.path in getattr( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import logging | |
import re | |
from gevent import monkey, spawn | |
from gevent.pool import Pool | |
monkey.patch_all() | |
from redis import Redis | |
import requests |
NewerOlder