def note_detail(request, note_slug):
note = get_object_or_404(Note, slug=note_slug) if request.user.is_staff else get_object_or_404(Note, slug=note_slug, status=1)
return render(request, 'note_detail.html', {'note': note})
\ No newline at end of file
def note_detail(request, note_slug):
note = get_object_or_404(Note, slug=note_slug) if request.user.is_staff else get_object_or_404(Note, slug=note_slug, status=1)
return render(request, 'note_detail.html', {'note': note})
\ No newline at end of file