@@ -0,0 +1,546 @@
+import json%0A%0Afrom django.core.management import BaseCommand%0Afrom django.db import connections%0A%0A%0Aclass Command(BaseCommand):%0A    help = %22Outputs the list of custom domains that will be used to generate let's encrypt certs%22%0A%0A    def handle(self, *args, **options):%0A        cursor = connections%5B'tiers'%5D.cursor()%0A        cursor.execute(%22SELECT custom_domain FROM organizations_microsite WHERE custom_domain != '';%22)%0A        rows = cursor.fetchall()%0A        domains = %5B%7B'domains': row%7D for row in rows%5D%0A        self.stdout.write(json.dumps(domains))%0A

add management command for outputting custom domains list