I hereby claim:
- I am urbaniak on github.
- I am urbaniak (https://keybase.io/urbaniak) on keybase.
- I have a public key ASA1ecDFdPdYsTQro3bkOpDPjAadBMD9Q1V1iJEEYC-Rswo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am urbaniak on github. | |
* I am urbaniak (https://keybase.io/urbaniak) on keybase. | |
* I have a public key ASCQ_K6xr8IbTSr2HiA9lRUj39MvMj-F6typoj9lPKe6Kgo | |
To claim this, I am signing this object: |
# coding: utf-8 | |
""" | |
Cauê Thenório - cauelt(at)gmail.com | |
This snippet makes Django do not create URL languages prefix (i.e. /en/) | |
for the default language (settings.LANGUAGE_CODE). | |
It also provides a middleware that activates the language based only on the URL. | |
This middleware ignores user session data, cookie and 'Accept-Language' HTTP header. |
import asyncio | |
import logging | |
from aiohttp.web import WebSocketResponse | |
from aiohttp.wsgi import WSGIServerHttpProtocol | |
from gunicorn.workers.gaiohttp import AiohttpWorker | |
class WSGIWebsocketProtocol(WSGIServerHttpProtocol): |