code: def preview(request):
      
      if settings.MARKDOWN_PROTECT_PREVIEW:
          user = getattr(request, 'user', None)
          if not user or not user.is_staff:
              from django.contrib.auth.views import redirect_to_login
              return redirect_to_login(request.get_full_path())
  
      return render(
          request, settings.MARKDOWN_PREVIEW_TEMPLATE, dict(
              content=request.POST.get('data', 'No content posted'),
              css=settings.MARKDOWN_STYLE
          ))
docs: Render preview page.
  
      :returns: A rendered preview