def get_resource_list_url(self): return reverse( '%s:api-%s' % (self.core.site_name, self.core.get_menu_group_pattern_name()))
def get_resource_url(self, pk): return reverse( '%s:api-resource-%s' % (self.core.site_name, self.core.get_menu_group_pattern_name()), args=(pk, ))
def get_api_url(self, request): return reverse(self.get_api_url_name())
def get_api_detail_url(self, request, obj): return reverse(self.get_api_detail_url_name(), kwargs={'pk': obj.pk})
def get_bulk_change_form_url(self): return (reverse(''.join( ('IS:', self.core.get_bulk_change_url_name(), '-', self.model._meta.object_name.lower()))) if self.is_bulk_change_enabled() else None)
def get_url_string(self, request, obj=None, kwargs=None): kwargs = kwargs or {} try_kwargs = self._get_try_kwargs(request, obj) try_kwargs.update(kwargs) return reverse(self.pattern, kwargs=try_kwargs)
def detail_url(self, site_name, menu_groups, obj): return reverse('{}:detail-{}'.format(site_name, '-'.join(menu_groups)), args=(obj.pk, ))
def add_url(self, site_name, menu_groups): return reverse('{}:add-{}'.format(site_name, '-'.join(menu_groups)))
def list_url(self, site_name, menu_groups): return reverse('{}:list-{}'.format(site_name, '-'.join(menu_groups)))
def get_url_string(self, request, obj=None, view_kwargs=None): view_kwargs = {} if view_kwargs is None else view_kwargs try_kwargs = self._get_try_kwargs(request, obj) try_kwargs.update(view_kwargs) return reverse(self.pattern, kwargs=try_kwargs)
def get_bulk_change_form_url(self): return (reverse( ''.join(('IS:', self.core.get_bulk_change_url_name(), '-', self.model._meta.object_name.lower()))) if self.is_bulk_change_enabled() else None)