# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-07-24 11:30
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
import profiles.storage
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('authtools', '0003_auto_20160128_0912'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='profile', serialize=False, to=settings.AUTH_USER_MODEL)),
                ('picture', models.ImageField(blank=True, help_text="Users's avatar", null=True, storage=profiles.storage.ProfileStorage(), upload_to=profiles.storage.profile_directory, verbose_name='Profile picture')),
                ('registered_for_api', models.BooleanField(default=False, help_text='Register for REST API use', verbose_name='Registered for waves_api use')),
                ('api_key', models.CharField(blank=True, help_text="User's waves_api access key", max_length=255, null=True, unique=True, verbose_name='Api key')),
                ('institution', models.CharField(help_text="User's laboratory", max_length=255, null=True, verbose_name='Institution')),
                ('country', django_countries.fields.CountryField(blank=True, help_text="User's country", max_length=2, null=True)),
                ('phone', models.CharField(blank=True, help_text="User's phone number", max_length=12, null=True, verbose_name='Phone')),
                ('comment', models.TextField(blank=True, help_text="User's comment", null=True, verbose_name='Comments')),
                ('ip', models.GenericIPAddressField(blank=True, help_text="User's restricted IP", null=True, verbose_name='Restricted IP address')),
                ('banned', models.BooleanField(default=False, verbose_name='Banned (abuse)')),
                ('slug', models.UUIDField(blank=True, default=uuid.uuid4, editable=False, unique=True)),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='userprofile',
            unique_together=set([('user', 'api_key')]),
        ),
    ]
