Skip to content

Instantly share code, notes, and snippets.

View miohtama's full-sized avatar
🏠
https://tradingstrategy.ai

Mikko Ohtamaa miohtama

🏠
https://tradingstrategy.ai
View GitHub Profile
@miohtama
miohtama / localized_routes.py
Last active November 5, 2016 20:53 — forked from mmerickel/localized_routes.py
localized routes in pyramid
"""Self-contained language aware path routing example for Pyramid."""
from urllib.parse import urlunparse
from urllib.parse import urlparse
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.httpexceptions import HTTPFound
from pyramid.request import Request
from pyramid.response import Response