<s> import random <EOL> import string <EOL> from django . db import models <EOL> from backend . logic . utils import escape_file_name <EOL> class Theme ( models . Model ) : <EOL> def archivePath ( self , filename ) : <EOL> return '<STR_LIT>' % escape_file_name ( filename ) <EOL> name = models . CharField ( max_length = <NUM_LIT:64> ) <EOL> elements = models . TextField ( blank = True , default = '<STR_LIT>' ) <EOL> downloads = models . IntegerField ( blank = True , default = <NUM_LIT:0> ) <EOL> date = models . DateField ( blank = True , auto_now_add = True ) <EOL> author = models . CharField ( blank = True , default = '<STR_LIT>' , max_length = <NUM_LIT:64> ) <EOL> website = models . CharField ( blank = True , default = '<STR_LIT>' , max_length = <NUM_LIT> ) <EOL> ect = models . IntegerField ( blank = True , default = - <NUM_LIT:1> ) <EOL> promote = models . BooleanField ( blank = True , default = True ) <EOL> comment = models . TextField ( blank = True , default = "<STR_LIT>" , max_length = <NUM_LIT> ) <EOL> archive = models . FileField ( blank = True , default = '<STR_LIT>' , max_length = <NUM_LIT> , upload_to = archivePath ) <EOL> moderating = models . BooleanField ( blank = True , default = True ) <EOL> def __unicode__ ( self ) : <EOL> return u'<STR_LIT>' % ( self . name , '<STR_LIT>' if self . moderating else '<STR_LIT>' ) <EOL> def genToken ( ) : <EOL> return '<STR_LIT>' . join ( random . choice ( string . ascii_uppercase + string . digits ) for _ in range ( <NUM_LIT> ) ) <EOL> class ShoppingToken ( models . Model ) : <EOL> date = models . DateField ( blank = True , auto_now_add = True ) <EOL> value = models . CharField ( blank = True , default = genToken , max_length = <NUM_LIT> ) <EOL> payed = models . BooleanField ( blank = True , default = False ) </s>
