original_docstring: Show details of a survey.
docstring: Show details of a survey.
docstring_tokens: Show details of a survey .
code: def survey_detail(request, survey_slug):
      """Show details of a survey."""
      if request.user.is_authenticated:
          if not request.user.groups.filter(name='Survey Creators').exists():
              raise Http404("Page not found")
      else:
          raise Http404("Page not found")
  
      survey = get_object_or_404(Survey, slug=survey_slug)
      my_surveys = Survey.objects.filter(author=request.user).order_by('title')
  
      if request.user == survey.author:
          return render(request,
                        'skip_logic/survey_detail.html',
                        {'survey': survey, 'my_surveys': my_surveys,})
      else:
          raise Http404("Page not found")
code_tokens: def survey_detail ( request , survey_slug ) : if request . user . is_authenticated : if not request . user . groups . filter ( name = 'Survey Creators' ) . exists ( ) : raise Http404 ( "Page not found" ) else : raise Http404 ( "Page not found" ) survey = get_object_or_404 ( Survey , slug = survey_slug ) my_surveys = Survey . objects . filter ( author = request . user ) . order_by ( 'title' ) if request . user == survey . author : return render ( request , 'skip_logic/survey_detail.html' , { 'survey' : survey , 'my_surveys' : my_surveys , } ) else : raise Http404 ( "Page not found" )
short_docstring: Show details of a survey.
short_docstring_tokens: Show details of a survey .
comment: """Show details of a survey."""