Coverage for main\views.py : 82%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
name='dispatch') ''' See the dashboard '''
name='dispatch') ''' Add an external fanfic '''
status=200) clean_url_fanfic)
title, author)
# if there are similars show on screen for the # user "no, keep going" and "choose this" # appear on screen content_type='text/plain', status=200) else: # there aren't similar ones, continue button # appear, if it's archiveofourown confirm fandom-type # with user. A fanfic can belong to more than one fandom # spinoff pass
except Exception: # couldn't parse well, server error, it's our fault # we'll fix it soon, try again in a few minutes return HttpResponse("Error: We have a server error and we'll " " fix it soon. It's our fault and we " "apologize. ", content_type='text/plain', status=200) else: if "choose_this" in request.POST: # Similar fanfic has been chosen # get id of fanfic, make another version (parse,...) # queue and notification when it's done to the user pass elif "keep_going" in request.POST: # there is not a similar fanfic in database # create new fanfic (parse,..) # queue and notification when it's done to the user pass else: return HttpResponse("Method not Allowed", status=405)
name='dispatch') ''' Show that an external fanfic has been added and user has to wait '''
return render(request, self.template_name) |