<commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
from django.conf import settings
import django.utils.timezone
import alert.models


def sites_patch_django17(apps, schema_editor):
    import django
    ver = django.get_version()

    if ver.startswith('1.7'):
        from django.contrib.sites.management import create_default_site
        from django.apps import apps
        create_default_site(apps.get_app_configs()[0])
<commit_msg>better way to test django version<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals

import django
from django.db import models, migrations
from django.conf import settings
import django.utils.timezone

import alert.models


def sites_patch_django17(apps, schema_editor):
    if django.VERSION[:2] == (1,7):
        from django.contrib.sites.management import create_default_site
        from django.apps import apps
        create_default_site(apps.get_app_configs()[0])

{'fraction_non_alphanumeric': 0.08639523336643495, 'fraction_numerical': 0.012909632571996028, 'mean_word_length': 4.22279792746114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7226339', 'n_tokens_mistral': 294, 'n_tokens_neox': 285, 'n_words': 80}