torchbox/wagtail — pull request #531 by nathan3d (2014-08-08 07:46:57+00:00)
Title: Change page url functions to use reverse

Fixes issue #69

I'd like to have Wagtail support running below the URL, for cases where Wagtail is used for a subsection of the site, and to support translations using Django's i18n_patterns which nests urls under the language code.

Reversing the root path using the main Wagtail url entry doesn't have any effect on the standard wagtail setup, so this still works fine.

urlpatterns = patterns('',
url(r'', include(wagtail_urls,)),
)

And with the proposed changes here, these two cases would work as well.

urlpatterns += i18n_patterns(
url(r'', include(wagtail_urls,)),
)

urlpatterns = patterns('',
url(r'^pizza/', include(wagtail_urls,)),
)