def purge_document_from_cache(instance, **kwargs): if not kwargs.get('created', False): base_url = get_base_url() purge_url_from_cache(base_url + reverse('tuiuiuapi_v2:documents:detail', args=(instance.id, )))
def purge_page_from_cache(instance, **kwargs): base_url = get_base_url() purge_url_from_cache(base_url + reverse('tuiuiuapi_v2:pages:detail', args=(instance.id, )))