vdboor
vdboor

Reputation: 22526

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.

Upvotes: 0

Views: 528

Answers (1)

vdboor
vdboor

Reputation: 22526

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.

Upvotes: 1

Related Questions