如何通过另一个模型调用模型路由(继承自RoutablePageMixin)?

时间:2019-05-15 09:21:40

标签: django wagtail

我有两个模型FooBar

class Foo(RoutablePageMixin, Page):
    .
    .
    @route(r'^(?P<regex>[-\w]+)/$', name='route_one')
    def route_one(self, request, regex, *args, **kwargs):

class Bar(RoutablePageMixin, Page):
    .
    .
    @route(r'^(?P<regex>[-\w]+)/$', name='route_two')
    def route_two(self, request, regex, *args, **kwargs):

route_one内,我想打电话给route_two怎么办? 我已经检查了w docs,但不知道该怎么做。

0 个答案:

没有答案