from django.conf import settings
from wagtail.models import Locale


def create_locales_for_wagtail():
    for language in settings.WAGTAIL_CONTENT_LANGUAGES:
        Locale.objects.get_or_create(language_code=language[0])
