Given this apphook:
class NewsHook(CMSApp):
name = _("News")
urls = ["apps.news.urls"]
apphook_pool.register(NewsHook)
and this model is inside apps.news.models:
class Article(models.Model):
title = models.CharField(max_length=255)
...
Can I link to a page related to apphook, for example, in an article method?
From the side of the model I came to article._meta.app_labelor article._meta.app_config.verbose_name, but it gives only 'news'and 'news'accordingly.
And I know from https://github.com/divio/django-cms/blob/7888ab8421bb836c8f7a1127d9a2bf4d4bbdf23e/cms/models/pagemodel.py#L82 that the page apphook is available with the help page.application_urlsthat gives me 'u'NewsHook'.
But I do not have enough links.
I believe that I could filter the pages by the application_urls field and look for a match with mine article._meta.app_config.verbose_name, but that would be neither a failure nor a beautiful one.
Any ideas for a better way?