我们从Python开源项目中,提取了以下40个代码示例,用于说明如何使用django.core.servers.basehttp.get_internal_wsgi_application()。
def get_handler(self, *args, **options): """ Returns the default WSGI handler for the runner. """ return get_internal_wsgi_application()
def make_wsgi_application(): # validate models s = StringIO() if get_validation_errors(s): s.seek(0) error = s.read() msg = "One or more models did not validate:\n%s" % error print(msg, file=sys.stderr) sys.stderr.flush() sys.exit(1) translation.activate(settings.LANGUAGE_CODE) if django14: return get_internal_wsgi_application() return WSGIHandler()
def setUp(self): self.handler = CRAStaticFilesHandler(get_internal_wsgi_application()) self._request = MagicMock(path='/fizz/buzz.jpg') setattr(settings, 'DEBUG', True)