<s> from django . contrib . sites . models import Site <EOL> from django . core . management . base import BaseCommand <EOL> from opps . channels . models import Channel <EOL> from opps . containers . models import Container <EOL> class Command ( BaseCommand ) : <EOL> args = "<STR_LIT>" <EOL> help = "<STR_LIT>" <EOL> def handle ( self , * args , ** options ) : <EOL> if len ( args ) < <NUM_LIT:2> : <EOL> print "<STR_LIT>" % self . args <EOL> return <EOL> pk , domain = args [ : <NUM_LIT:2> ] <EOL> s = Site . objects . get ( pk = pk ) <EOL> s . domain = domain <EOL> s . save ( update_fields = [ '<STR_LIT>' ] ) <EOL> print "<STR_LIT>" <EOL> print Channel . objects . filter ( site_id = pk ) . update ( site_domain = domain ) , <EOL> print "<STR_LIT>" <EOL> print Container . objects . filter ( site_id = pk ) . update ( site_domain = domain ) , <EOL> print "<STR_LIT>" </s>
