from django.utils import translation
from django.conf import settings
from django.http import Http404
from django.utils import translation
from django.conf import settings
from django.http import Http404
class SetRemoteAddrFromXRealIP(object):
"""Sets REMOTE_ADDR from the X-Real-IP header, as set by Nginx."""
def process_request(self, request):
class SetRemoteAddrFromXRealIP(object):
"""Sets REMOTE_ADDR from the X-Real-IP header, as set by Nginx."""
def process_request(self, request):
def process_request(self, request):
language = translation.get_language_from_path(request.path_info)
def process_request(self, request):
language = translation.get_language_from_path(request.path_info)
def process_response(self, request, response):
language = translation.get_language()
def process_response(self, request, response):
language = translation.get_language()