Ejemplo n.º 1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('postal_code', models.CharField(max_length=10)),
                ('phone', models.CharField(blank=True, max_length=15)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='UserProfileImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file',
                 models.ImageField(default='not-image.png',
                                   upload_to=apps.users.models.path)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 3
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo',
                 models.ImageField(
                     blank=True,
                     default=
                     '/home/murat/projects/itacademy/65/files/media/profile.jpg',
                     null=True,
                     upload_to=apps.users.models.upload_to)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='customer',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):
    dependencies = [
        ('users', '0008_auto_20200623_1017'),
    ]

    operations = [
        migrations.AlterField(
            model_name='otp',
            name='type',
            field=models.CharField(choices=[('E', 'Email'), ('P', 'Phone')], max_length=2, verbose_name='Type'),
        ),
        migrations.AlterField(
            model_name='user',
            name='photo',
            field=easy_thumbnails.fields.ThumbnailerImageField(blank=True, null=True,
                                                               upload_to=apps.users.models.User.get_path),
        ),
        migrations.CreateModel(
            name='NotificationSetting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('last_update_time', models.DateTimeField(auto_now=True, null=True)),
                ('device_id', models.CharField(max_length=255, verbose_name='Device Id')),
                ('enabled', models.BooleanField(default=True, null=True, verbose_name='Enabled')),
                ('book_added', models.BooleanField(default=True, null=True, verbose_name='Book Added')),
                ('book_approved', models.BooleanField(default=True, null=True, verbose_name='Book Approved')),
                ('audio_approved', models.BooleanField(default=True, null=True, verbose_name='Audio Approved')),
                ('user',
                 models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='notification_setting',
                                      to=settings.AUTH_USER_MODEL, verbose_name='Notification Setting')),
            ],
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('creation_time', models.DateTimeField(auto_now_add=True, null=True)),
                ('last_update_time', models.DateTimeField(auto_now=True, null=True)),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('type', models.CharField(choices=[('book_added', 'Book Added'), ('book_approved', 'Book Approved'),
                                                   ('audio_approved', 'Audio Approved')], max_length=20,
                                          verbose_name='Type')),
                ('message', models.CharField(max_length=1000, verbose_name='Message')),
                ('read', models.BooleanField(default=False, null=True, verbose_name='Read')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='notifications',
                                           to=settings.AUTH_USER_MODEL, verbose_name='Notifications')),
            ],
            options={
                'ordering': ['-read', '-creation_time'],
            },
        ),
    ]
Ejemplo n.º 5
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('users', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserAvater',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to=apps.users.models.user_directory_path)),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('trainings', '0044_delete_training'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('users', '0016_auto_20210422_1733'),
    ]

    operations = [
        migrations.AlterField(
            model_name='usersettings',
            name='age_group',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='users', to='trainings.youth', verbose_name='Altersgruppe'),
        ),
        migrations.AlterField(
            model_name='usersettings',
            name='bookmarks',
            field=models.ManyToManyField(blank=True, related_name='users', to='trainings.Exercise', verbose_name='Gesetzte Favoriten'),
        ),
        migrations.AlterField(
            model_name='usersettings',
            name='difficulties',
            field=models.ManyToManyField(blank=True, default=apps.users.models.get_difficulties_default, related_name='users', to='trainings.Difficulty', verbose_name='Schwierigkeit'),
        ),
        migrations.AlterField(
            model_name='usersettings',
            name='filter_groups',
            field=models.ManyToManyField(blank=True, related_name='users', to='trainings.Group', verbose_name='Geöffnete Gruppen'),
        ),
        migrations.AlterField(
            model_name='usersettings',
            name='training_filters',
            field=models.ManyToManyField(blank=True, related_name='users', to='trainings.Filter', verbose_name='Gesetzte Filter'),
        ),
        migrations.AlterField(
            model_name='usersettings',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='settings', to=settings.AUTH_USER_MODEL, verbose_name='Benutzer'),
        ),
    ]
Ejemplo n.º 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Usuario',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('expediente', models.IntegerField(default=0)),
                ('correo', models.EmailField(max_length=254)),
                ('nombre', models.CharField(max_length=80)),
                ('is_tutor', models.BooleanField(default=False)),
                ('is_tutorado', models.BooleanField(default=False)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_profesor', models.BooleanField(default=False)),
                ('foto',
                 models.ImageField(
                     blank=True,
                     null=True,
                     upload_to=apps.users.models.get_upload_path_user_image)),
                ('descripcion', models.TextField(blank=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):
    dependencies = [
        ('users', '0006_auto_20200622_2217'),
    ]

    operations = [
        migrations.AlterField(
            model_name='user',
            name='photo',
            field=easy_thumbnails.fields.ThumbnailerImageField(
                blank=True,
                null=True,
                upload_to=apps.users.models.User.get_path),
        ),
        migrations.CreateModel(
            name='Note',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('note',
                 models.TextField(blank=True, null=True, verbose_name='Note')),
                ('creation_time',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('last_update_time',
                 models.DateTimeField(auto_now=True, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='notes',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Notes')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('users', '0002_customer'),
    ]

    operations = [
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('resume',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=apps.users.models.resume_upload_to)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='employee',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AlterField(
            model_name='customer',
            name='photo',
            field=models.ImageField(blank=True,
                                    default='profile.jpg',
                                    null=True,
                                    upload_to=apps.users.models.upload_to),
        ),
    ]
Ejemplo n.º 10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('first_name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='first name')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='last name')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('is_seller', models.BooleanField(default=False)),
                ('is_customer', models.BooleanField(default=False)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('username', models.CharField(max_length=150)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', apps.users.models.EmailUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Seller',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('company_name', models.CharField(max_length=50)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('is_superuser',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates that this user has all permissions without explicitly assigning them.',
                     verbose_name='superuser status')),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='email address')),
                ('is_staff',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether the user can log into this admin site.',
                     verbose_name='staff status')),
                ('is_active',
                 models.BooleanField(
                     default=True,
                     help_text=
                     'Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                     verbose_name='active')),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='date joined')),
                ('full_name',
                 models.CharField(blank=True,
                                  max_length=255,
                                  verbose_name='full name')),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'ordering': ['email'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('resume',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=apps.users.models.resume_upload_to)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='employee',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': [('can_view', 'Can view employees')],
            },
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo',
                 models.ImageField(blank=True,
                                   default='profile.jpg',
                                   null=True,
                                   upload_to=apps.users.models.upload_to)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='customer',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': [('can_view', 'Can view customers')],
            },
        ),
    ]
Ejemplo n.º 12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('is_volunteer', models.BooleanField(default=False)),
                ('is_organization', models.BooleanField(default=False)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('name', models.CharField(max_length=50)),
                ('address', models.CharField(max_length=255)),
                ('phone_number', models.SmallIntegerField()),
                ('email', models.EmailField(max_length=100)),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('bio', models.TextField()),
                ('image', models.ImageField(null=True, upload_to=apps.users.models.upload_image_path)),
            ],
            options={
                'db_table': 'organization',
            },
        ),
        migrations.CreateModel(
            name='Volunteer',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('first_name', models.CharField(max_length=50)),
                ('last_name', models.CharField(max_length=50)),
                ('phone_number', models.SmallIntegerField()),
                ('email', models.EmailField(max_length=100)),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('bio', models.TextField()),
                ('image', models.ImageField(null=True, upload_to=apps.users.models.upload_image_path)),
            ],
            options={
                'db_table': 'volunteer',
            },
        ),
    ]
Ejemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='email address')),
                ('is_student', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     serialize=False,
                     to='users.user')),
                ('name', models.CharField(max_length=100)),
                ('bio', models.TextField(blank=True, default='')),
                ('preferred_name', models.CharField(max_length=100,
                                                    null=True)),
                ('avatar',
                 models.ImageField(
                     max_length=5000,
                     upload_to=apps.users.models.upload_location)),
                ('discord_name', models.CharField(max_length=100, null=True)),
                ('github_username', models.CharField(max_length=100)),
                ('codepen_username', models.CharField(max_length=100,
                                                      null=True)),
                ('current_level',
                 models.IntegerField(choices=[(1, 'Level One'),
                                              (2, 'Level Two')],
                                     default=1)),
                ('phone', models.CharField(max_length=50, null=True)),
                ('timezone', models.CharField(max_length=50, null=True)),
            ],
        ),
    ]