<s> """<STR_LIT>""" <EOL> import random <EOL> import tempfile <EOL> from django . core . files . storage import FileSystemStorage <EOL> from django . db import models <EOL> class CustomValidNameStorage ( FileSystemStorage ) : <EOL> def get_valid_name ( self , name ) : <EOL> return name + '<STR_LIT>' <EOL> temp_storage_location = tempfile . mkdtemp ( ) <EOL> temp_storage = FileSystemStorage ( location = temp_storage_location ) <EOL> class Storage ( models . Model ) : <EOL> def custom_upload_to ( self , filename ) : <EOL> return '<STR_LIT:foo>' <EOL> def random_upload_to ( self , filename ) : <EOL> return '<STR_LIT>' % ( random . randint ( <NUM_LIT:100> , <NUM_LIT> ) , filename ) <EOL> normal = models . FileField ( storage = temp_storage , upload_to = '<STR_LIT>' ) <EOL> custom = models . FileField ( storage = temp_storage , upload_to = custom_upload_to ) <EOL> random = models . FileField ( storage = temp_storage , upload_to = random_upload_to ) <EOL> custom_valid_name = models . FileField ( <EOL> storage = CustomValidNameStorage ( location = temp_storage_location ) , <EOL> upload_to = random_upload_to , <EOL> ) <EOL> default = models . FileField ( storage = temp_storage , upload_to = '<STR_LIT>' , default = '<STR_LIT>' ) <EOL> empty = models . FileField ( storage = temp_storage ) <EOL> limited_length = models . FileField ( storage = temp_storage , upload_to = '<STR_LIT>' , max_length = <NUM_LIT:20> ) <EOL> extended_length = models . FileField ( storage = temp_storage , upload_to = '<STR_LIT>' , max_length = <NUM_LIT> ) </s>
