<s> import datetime <EOL> from django . db import models <EOL> JSON = <NUM_LIT:1> <EOL> XML = <NUM_LIT:2> <EOL> FORMAT_CHOICES = ( <EOL> ( JSON , "<STR_LIT>" ) , <EOL> ( XML , "<STR_LIT>" ) , <EOL> ) <EOL> class ProviderRule ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT> , null = True , blank = True ) <EOL> regex = models . CharField ( max_length = <NUM_LIT> ) <EOL> endpoint = models . CharField ( max_length = <NUM_LIT> ) <EOL> format = models . IntegerField ( choices = FORMAT_CHOICES ) <EOL> def __unicode__ ( self ) : <EOL> return self . name or self . endpoint <EOL> class StoredOEmbed ( models . Model ) : <EOL> match = models . TextField ( ) <EOL> max_width = models . IntegerField ( ) <EOL> max_height = models . IntegerField ( ) <EOL> html = models . TextField ( ) <EOL> date_added = models . DateTimeField ( default = datetime . datetime . now ) <EOL> def __unicode__ ( self ) : <EOL> return self . match </s>
