PageRenderTime 43ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/regressiontests/urlpatterns_reverse/urlconf_inner.py

https://code.google.com/p/mango-py/
Python | 13 lines | 11 code | 2 blank | 0 comment | 0 complexity | f6a096e53d7e0cf947a4213907cadc24 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. from django.conf.urls.defaults import *
  2. from django.template import Template, Context
  3. from django.http import HttpResponse
  4. def inner_view(request):
  5. content = Template('{% load url from future %}'
  6. '{% url "outer" as outer_url %}outer:{{ outer_url }},'
  7. '{% url "inner" as inner_url %}inner:{{ inner_url }}').render(Context())
  8. return HttpResponse(content)
  9. urlpatterns = patterns('',
  10. url(r'^second_test/$', inner_view, name='inner'),
  11. )