Если вы используете более новые версии django. миграция данных выглядит так:
from django.conf import settings
from django.db import migrations
def change_site_name(apps, schema_editor):
Site = apps.get_model('sites', 'Site')
site = Site.objects.get(id=settings.SITE_ID)
site.domain = 'yourdomain.com'
site.name = 'Your Site'
site.save()
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.RunPython(change_site_name),
]