def get_view_url(self): # Support both use cases of the same view: if "page" in self.kwargs: view_url_name = self.view_url_name_paginated else: view_url_name = self.view_url_name return mixed_reverse(view_url_name, args=self.args, kwargs=self.kwargs, current_page=self.get_current_page())
def get_view_url(self): # Support both use cases of the same view: if 'page' in self.kwargs: view_url_name = self.view_url_name_paginated else: view_url_name = self.view_url_name return mixed_reverse(view_url_name, args=self.args, kwargs=self.kwargs, current_page=self.get_current_page())
def faq_reverse(viewname, args=None, kwargs=None, current_app='fluent_faq', **page_kwargs): """ Reverse a URL to the FAQ, taking various configuration options into account. This is a compatibility function to allow django-fluent-faq to operate stand-alone. Either the app can be hooked in the URLconf directly, or it can be added as a pagetype of *django-fluent-pages*. """ return mixed_reverse(viewname, args=args, kwargs=kwargs, current_app=current_app, **page_kwargs)
def _reverse_faqpage_index(self, request, obj=None): # Internal method with "protected access" to handle translation differences. # This is only called when 'fluent_pages' is in the INSTALLED_APPS. return mixed_reverse('faqquestion_index')