defadd_arguments(self,parser):parser.add_argument("apply",type=str,help="Hostname for the apply site.")parser.add_argument("port",type=int,help="Port to use for all sites.")
@transaction.atomicdefhandle(self,*args,**options):site_apply=Site.objects.get(id=2)site_apply.hostname=options["apply"]site_apply.port=options["port"]site_apply.save()self.stdout.write(f"Updated the apply site to {options['apply']}:{options['port']}.")