def get_full_status_display(self): return get_full_status_display(self)
def display_status(request, permanence_id): if request.is_ajax(): if request.user.is_staff: permanence = Permanence.objects.filter(id=permanence_id).order_by('?').first() return HttpResponse(get_full_status_display(permanence)) raise Http404