<s> import sys <EOL> from django . shortcuts import render <EOL> from db_file_storage . storage import FixedModelDatabaseFileStorage <EOL> from formtools . wizard . views import SessionWizardView <EOL> from . forms import SongLyricsForm1 , SongLyricsForm2 , SongLyricsForm3 <EOL> class SongLyricsWizard ( SessionWizardView ) : <EOL> file_storage = FixedModelDatabaseFileStorage ( <EOL> model_class_path = '<STR_LIT>' , <EOL> content_field = '<STR_LIT:content>' , <EOL> filename_field = '<STR_LIT:name>' , <EOL> mimetype_field = '<STR_LIT>' <EOL> ) <EOL> form_list = [ SongLyricsForm1 , SongLyricsForm2 , SongLyricsForm3 ] <EOL> template_name = '<STR_LIT>' <EOL> def done ( self , form_list , ** kwargs ) : <EOL> if sys . version_info . major == <NUM_LIT:3> : <EOL> form_list = list ( form_list ) <EOL> song = form_list [ <NUM_LIT:0> ] . cleaned_data [ '<STR_LIT>' ] <EOL> artist = form_list [ <NUM_LIT:0> ] . cleaned_data [ '<STR_LIT>' ] <EOL> lyrics = form_list [ <NUM_LIT:1> ] . cleaned_data [ '<STR_LIT>' ] . read ( ) <EOL> sender = form_list [ <NUM_LIT:2> ] . cleaned_data [ '<STR_LIT>' ] <EOL> context = { '<STR_LIT>' : song , '<STR_LIT>' : artist , <EOL> '<STR_LIT>' : lyrics , '<STR_LIT>' : sender } <EOL> return render ( self . request , '<STR_LIT>' , context ) </s>
