# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-01-28 09:49
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('djadmin', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='DjadminCard',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name of Card')),
                ('html', models.TextField(verbose_name='HTML Code')),
                ('location', models.SmallIntegerField(choices=[(0, 'LIST PAGE'), (1, 'FORM PAGE')], help_text='It will help to show this card on selected location for this model', verbose_name='Select Location')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['date_created'],
                'verbose_name': 'Djadmin Card',
                'verbose_name_plural': 'Djadmin Cards',
            },
        ),
        migrations.CreateModel(
            name='DjadminField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Field Name')),
                ('type', models.CharField(max_length=30, verbose_name='Field Type')),
                ('model', models.CharField(max_length=50, verbose_name='Model Name')),
                ('depth', models.IntegerField(verbose_name='Field Depth')),
                ('foreignkey_model', models.CharField(blank=True, max_length=50, null=True, verbose_name='Foreign Key Model Name')),
            ],
            options={
                'db_table': 'djadmin_field',
                'verbose_name': 'Djadmin Field',
                'verbose_name_plural': 'Djadmin Fields',
            },
        ),
        migrations.CreateModel(
            name='DjadminModelSetting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('model', models.CharField(max_length=50, verbose_name='Model Name')),
                ('app_label', models.CharField(max_length=50, verbose_name='Model App Label Name')),
                ('list_per_page', models.IntegerField(blank=True, help_text='Set list_per_page to control how many items appear on each paginated admin change list page.', null=True, verbose_name='List Per Page')),
                ('list_max_show_all', models.IntegerField(blank=True, help_text="Set list_max_show_all to control how many items can appear on a 'Show all' admin change list page.", null=True, verbose_name='List Max Show All')),
                ('date_hierarchy', models.ForeignKey(blank=True, help_text='Set date_hierarchy to the name of a DateField or DateTimeField in your model, and the change list page will include a date-based drilldown navigation by that field.', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='date_hierarchy', to='djadmin.DjadminField', verbose_name='Date Hierarchy')),
                ('list_display', models.ManyToManyField(blank=True, help_text='Set list_display to control which fields are displayed on the change list page of the admin.', related_name='list_display', to='djadmin.DjadminField', verbose_name='List Display')),
                ('list_display_links', models.ManyToManyField(blank=True, help_text='Use list_display_links to control if and which fields in list_display should be linked to the change list page for an object.', related_name='list_display_links', to='djadmin.DjadminField', verbose_name='List Display Link')),
                ('list_editable', models.ManyToManyField(blank=True, help_text='Set list_editable to a list of field names on the model which will allow editing on the change list page.', related_name='list_editable', to='djadmin.DjadminField', verbose_name='List Editable')),
                ('list_filter', models.ManyToManyField(blank=True, help_text='Set list_filter to activate filters in the right sidebar of the change list page of the admin', related_name='list_filter', to='djadmin.DjadminField', verbose_name='List Filter')),
                ('search_fields', models.ManyToManyField(blank=True, help_text='Set search_fields to enable a search box on the admin change list page.', related_name='search_fields', to='djadmin.DjadminField', verbose_name='Search Fields')),
            ],
            options={
                'ordering': ['model'],
                'db_table': 'djadmin_model_setting',
                'verbose_name': 'Djadmin Model Setting',
                'verbose_name_plural': 'Djadmin Model Settings',
            },
        ),
        migrations.AddField(
            model_name='djadmincard',
            name='model',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='djadmin.DjadminModelSetting'),
        ),
    ]
