<s> from __future__ import unicode_literals <EOL> from django . contrib . sites . models import Site <EOL> from django . db import models <EOL> from django . urls import get_script_prefix <EOL> from django . utils . encoding import iri_to_uri , python_2_unicode_compatible <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> @ python_2_unicode_compatible <EOL> class FlatPage ( models . Model ) : <EOL> url = models . CharField ( _ ( '<STR_LIT>' ) , max_length = <NUM_LIT:100> , db_index = True ) <EOL> title = models . CharField ( _ ( '<STR_LIT:title>' ) , max_length = <NUM_LIT:200> ) <EOL> content = models . TextField ( _ ( '<STR_LIT:content>' ) , blank = True ) <EOL> enable_comments = models . BooleanField ( _ ( '<STR_LIT>' ) , default = False ) <EOL> template_name = models . CharField ( <EOL> _ ( '<STR_LIT>' ) , <EOL> max_length = <NUM_LIT> , <EOL> blank = True , <EOL> help_text = _ ( <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> ) , <EOL> ) <EOL> registration_required = models . BooleanField ( <EOL> _ ( '<STR_LIT>' ) , <EOL> help_text = _ ( "<STR_LIT>" ) , <EOL> default = False , <EOL> ) <EOL> sites = models . ManyToManyField ( Site , verbose_name = _ ( '<STR_LIT>' ) ) <EOL> class Meta : <EOL> db_table = '<STR_LIT>' <EOL> verbose_name = _ ( '<STR_LIT>' ) <EOL> verbose_name_plural = _ ( '<STR_LIT>' ) <EOL> ordering = ( '<STR_LIT:url>' , ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" % ( self . url , self . title ) <EOL> def get_absolute_url ( self ) : <EOL> return iri_to_uri ( get_script_prefix ( ) . rstrip ( '<STR_LIT:/>' ) + self . url ) </s>
