nullFile = lambda r: HttpResponse() # As you might've figured out, you use it in urls.py with: # (r'myRegex', 'some.module.nullFile'),