<s> from __future__ import unicode_literals <EOL> from django . db import migrations <EOL> def create_homepage ( apps , schema_editor ) : <EOL> ContentType = apps . get_model ( '<STR_LIT>' ) <EOL> Page = apps . get_model ( '<STR_LIT>' ) <EOL> Site = apps . get_model ( '<STR_LIT>' ) <EOL> HomePage = apps . get_model ( '<STR_LIT>' ) <EOL> Page . objects . get ( id = <NUM_LIT:2> ) . delete ( ) <EOL> homepage_content_type , created = ContentType . objects . get_or_create ( <EOL> model = '<STR_LIT>' , app_label = '<STR_LIT>' ) <EOL> homepage = HomePage . objects . create ( <EOL> title = "<STR_LIT>" , <EOL> slug = '<STR_LIT>' , <EOL> content_type = homepage_content_type , <EOL> path = '<STR_LIT>' , <EOL> depth = <NUM_LIT:2> , <EOL> numchild = <NUM_LIT:0> , <EOL> url_path = '<STR_LIT>' , <EOL> ) <EOL> Site . objects . create ( <EOL> hostname = '<STR_LIT:localhost>' , root_page = homepage , is_default_site = True ) <EOL> class Migration ( migrations . Migration ) : <EOL> dependencies = [ <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ] <EOL> operations = [ <EOL> migrations . RunPython ( create_homepage ) , <EOL> ] </s>
