<s> from django . db import models <EOL> from jsonfield import JSONField <EOL> class User ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> username = models . CharField ( max_length = <NUM_LIT:50> , primary_key = True ) <EOL> avatar_url = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> last_updated = models . DateTimeField ( null = True ) <EOL> def getDict ( self ) : <EOL> return { <EOL> '<STR_LIT:name>' : self . name , <EOL> '<STR_LIT:username>' : self . username , <EOL> '<STR_LIT>' : self . avatar_url , <EOL> '<STR_LIT>' : str ( self . last_updated ) <EOL> } <EOL> def __str__ ( self ) : <EOL> return self . name + '<STR_LIT>' + self . username + '<STR_LIT:)>' <EOL> class Tutorial ( models . Model ) : <EOL> title = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> description = models . TextField ( ) <EOL> repo_name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> repo_url = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> owner = models . ForeignKey ( User ) <EOL> def __str__ ( self ) : <EOL> return self . title <EOL> class Step ( models . Model ) : <EOL> index = models . IntegerField ( ) <EOL> title = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> content_before = models . TextField ( ) <EOL> content_after = models . TextField ( ) <EOL> diff_url = models . CharField ( max_length = <NUM_LIT> ) <EOL> code_url = models . CharField ( max_length = <NUM_LIT> ) <EOL> files = models . TextField ( ) <EOL> tutorial = models . ForeignKey ( Tutorial ) <EOL> def __str__ ( self ) : <EOL> return self . title </s>
