# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-27 05:02
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('wagtailcore', '0040_page_draft_title'),
    ]

    operations = [
        migrations.CreateModel(
            name='AllowedUrl',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pattern', models.CharField(help_text="Case-sensitive. A missing trailing slash does also match to files which start with the name of the pattern, e.g., '/admin' matches /admin.html too. Some major search engines allow an asterisk (*) as a wildcard and a dollar sign ($) to match the end of the URL, e.g., '/*.jpg$'.", max_length=255, verbose_name='pattern')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'url',
                'verbose_name_plural': 'urls',
            },
        ),
        migrations.CreateModel(
            name='DisallowedUrl',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('pattern', models.CharField(help_text="Case-sensitive. A missing trailing slash does also match to files which start with the name of the pattern, e.g., '/admin' matches /admin.html too. Some major search engines allow an asterisk (*) as a wildcard and a dollar sign ($) to match the end of the URL, e.g., '/*.jpg$'.", max_length=255, verbose_name='pattern')),
            ],
            options={
                'abstract': False,
                'verbose_name': 'url',
                'verbose_name_plural': 'urls',
            },
        ),
        migrations.CreateModel(
            name='Rule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('robot', models.CharField(help_text="This should be a user agent string like 'Googlebot'. Enter an asterisk (*) for all user agents. For a full list look at the <a target=_blank href='http://www.robotstxt.org/db.html'> database of Web Robots</a>.", max_length=255, verbose_name='robot')),
                ('crawl_delay', models.DecimalField(blank=True, decimal_places=1, help_text="Between 0.1 and 99.0. This field is supported by some search engines and defines the delay between successive crawler accesses in seconds. If the crawler rate is a problem for your server, you can set the delay up to 5 or 10 or a comfortable value for your server, but it's suggested to start with small values (0.5-1), and increase as needed to an acceptable value for your server. Larger delay values add more delay between successive crawl accesses and decrease the maximum crawl rate to your web server.", max_digits=3, null=True, verbose_name='crawl delay')),
                ('sites', models.ManyToManyField(blank=True, help_text='The sites which these rules apply to. If none selected, will apply to all sites. CTRL+Click to deselect.', related_name='sites', to='wagtailcore.Site', verbose_name='sites')),
            ],
            options={
                'verbose_name': 'robots.txt rule',
                'verbose_name_plural': 'robots.txt rules',
            },
        ),
        migrations.AddField(
            model_name='disallowedurl',
            name='rule',
            field=modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='disallowed', to='robots.Rule'),
        ),
        migrations.AddField(
            model_name='allowedurl',
            name='rule',
            field=modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='allowed', to='robots.Rule'),
        ),
    ]
