from django.core.management.base import BaseCommand
from django.contrib.sites.models import Site

class Command(BaseCommand):
    def handle(self, *args, **options):
        site = Site.objects.get()
        site.domain = 'website.jongedemocraten.nl'
        site.name = 'Landelijk'
        site.save()

Add management script to rename the default site
Add management script to rename the default site

Django 1.8 automatically names the default website instead of asking
for the domain name it should use. Our import script depends on
setting the domain name of the default site before importing content.
This script can be run to set the domain and name of the default site
appropriately.
