<s> import os <EOL> import sys <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . abspath ( '<STR_LIT:..>' ) ) <EOL> os . environ . setdefault ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> from django . core . wsgi import get_wsgi_application <EOL> from django . conf import settings <EOL> from ws4redis . uwsgi_runserver import uWSGIWebsocketServer <EOL> _django_app = get_wsgi_application ( ) <EOL> _websocket_app = uWSGIWebsocketServer ( ) <EOL> def application ( environ , start_response ) : <EOL> if environ . get ( '<STR_LIT>' ) . startswith ( settings . WEBSOCKET_URL ) : <EOL> return _websocket_app ( environ , start_response ) <EOL> return _django_app ( environ , start_response ) </s>
