Adapt on-the-run URL parsing to django-based site