Django-CMS, how to resolve a named apphook URL from a management command?
I开发者_开发知识库've got a management command which sends email. In this email, I'd like to include a URL to a signup form, which is an apphook module in the CMS.
How can I resolve the URL to that path?
From the management command, I only see the plain URLconf, without the changes made by Django-CMS.
Solved my problem. It turns out that the pages may not appear in the URLconf (or urlpatterns), but the reverse()
will work nevertheless.
The pagename does have to be fixed with the language code. For example:
reverse('nl:my-profile')
And the cms.appresolvers
module will do it's work to find the page.
精彩评论