Skip to content

Instantly share code, notes, and snippets.

# from http://docs.webfaction.com/software/django/troubleshooting.htmlhighlight=django%20remote%20addres#accessing-remote-addr
class WebFactionFixes(object):
"""Sets 'REMOTE_ADDR' based on 'HTTP_X_FORWARDED_FOR', if the latter is
set.
Based on http://djangosnippets.org/snippets/1706/
"""
def process_request(self, request):
if 'HTTP_X_FORWARDED_FOR' in request.META:
@dolugen
dolugen / .vimrc
Created July 29, 2010 08:02
Ажлын vim тохиргоо
set encoding=utf8
set nopaste
set expandtab
set textwidth=0
set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set backspace=indent,eol,start
set incsearch