示例#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')),
                ('profile_pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('bio', models.TextField(blank=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('name', models.CharField(max_length=30)),
                ('caption', models.TextField(blank=True)),
                ('post_date', models.DateTimeField(auto_now_add=True)),
                ('likes',
                 models.ManyToManyField(related_name='posts',
                                        to=settings.AUTH_USER_MODEL)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-post_date'],
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField()),
                ('pub_date', models.DateTimeField(auto_now_add=True)),
                ('image',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='clone.Image')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
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')),
                ('photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='profile')),
                ('bio', models.CharField(blank=True, max_length=200)),
                ('name', models.CharField(blank=True, max_length=50)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='post')),
                ('name', models.CharField(blank=True, max_length=50)),
                ('caption', models.CharField(blank=True, max_length=100)),
                ('likes', models.IntegerField(default=0)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='instar.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('followed',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='followers',
                                   to='instar.profile')),
                ('follower',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='following',
                                   to='instar.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField(max_length=256)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='instar.post')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='instar.profile')),
            ],
        ),
    ]
示例#3
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='ProfileSettingsModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('first_name',
                 models.CharField(blank=True, max_length=20, null=True)),
                ('bio', models.CharField(blank=True, max_length=140,
                                         null=True)),
                ('location',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('personal_link',
                 models.CharField(blank=True, max_length=30, null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='settings',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TweetModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('tweet_content', models.CharField(max_length=280)),
                ('publish_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('tweet_likes', models.IntegerField(default=0)),
                ('tweet_retweets', models.IntegerField(default=0)),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='tweets',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='RetweetModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('retweet_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('retweet',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='retweet',
                     to='tweet.tweetmodel')),
                ('retweet_settings',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='retweet_settings',
                     to='tweet.profilesettingsmodel')),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='user_retweeted',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FollowModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('followed',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='followed',
                     to=settings.AUTH_USER_MODEL)),
                ('follower',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='follower',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#4
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')),
                ('job_title',
                 models.CharField(blank=True, max_length=150, null=True)),
                ('location',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('bio', models.TextField(max_length=120, null=True)),
                ('avatar',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('project_name', models.CharField(max_length=120, null=True)),
                ('description',
                 models.TextField(max_length=1000,
                                  null=True,
                                  verbose_name='project Description')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('like', models.IntegerField(default=0)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_profile',
                                   to='awards.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Screenshot',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image_1',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('image_2',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('image_3',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
            ],
        ),
        migrations.CreateModel(
            name='Stream',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('following',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='stream_following',
                                   to=settings.AUTH_USER_MODEL)),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='awards.project')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('design',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('usability',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('content',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='rater_profile',
                                   to='awards.profile')),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_ratings',
                                   to='awards.project')),
            ],
        ),
        migrations.AddField(
            model_name='project',
            name='screenshots',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='project_images',
                to='awards.screenshot'),
        ),
        migrations.AddField(
            model_name='project',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='post_user',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Likes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_like',
                                   to='awards.project')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_like',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('follower',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='follower',
                                   to=settings.AUTH_USER_MODEL)),
                ('following',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='following',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField(null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='commenter_profile',
                                   to='awards.profile')),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_comment',
                                   to='awards.project')),
            ],
        ),
    ]
示例#5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=150)),
                ('overview', models.TextField()),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('thumnail',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('featured', models.BooleanField()),
                ('date_added',
                 models.DateField(auto_now_add=True,
                                  verbose_name='date published')),
                ('video_display', models.BooleanField()),
                ('video', embed_video.fields.EmbedVideoField(blank=True)),
                ('categories',
                 models.ManyToManyField(blank=True,
                                        related_name='packages',
                                        to='posts.category')),
            ],
            options={
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='PostImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('images',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('Post',
                 models.ForeignKey(default=None,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='posts.post')),
            ],
        ),
    ]
示例#6
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')),
                ('profile_pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('bio', models.TextField()),
                ('location', models.CharField(max_length=60)),
                ('email', models.EmailField(max_length=254)),
                ('portfolio_link', models.URLField()),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('screenshot',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('description', models.TextField()),
                ('link', models.URLField()),
                ('post_date', models.DateTimeField(auto_now_add=True,
                                                   null=True)),
                ('design_score', models.IntegerField(default=0)),
                ('usability_score', models.IntegerField(default=0)),
                ('content_score', models.IntegerField(default=0)),
                ('average_design', models.FloatField(default=0)),
                ('average_usability', models.FloatField(default=0)),
                ('average_content', models.FloatField(default=0)),
                ('average_score', models.FloatField(default=0)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='awardsapp.profile')),
                ('voters',
                 models.ManyToManyField(related_name='votes',
                                        to='awardsapp.Profile')),
            ],
        ),
    ]
示例#7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Anuncio',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('creacion',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('modificacion',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('publicacion', models.DateTimeField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='BitacoraContactos',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('consulta',
                 models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'verbose_name': 'BitacoraContacto',
                'verbose_name_plural': 'BitacoraCotactos',
            },
        ),
        migrations.CreateModel(
            name='Cliente',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('apellidos', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('movil', models.IntegerField()),
                ('fijo', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Cliente',
                'verbose_name_plural': 'Clientes',
            },
        ),
        migrations.CreateModel(
            name='Comuna',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
            options={
                'ordering': ['nombre'],
            },
        ),
        migrations.CreateModel(
            name='Direccion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('calle', models.CharField(max_length=150)),
                ('numero', models.CharField(max_length=7)),
                ('detalle',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('codigo_postal', models.IntegerField(blank=True, null=True)),
                ('comuna',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Comuna')),
            ],
        ),
        migrations.CreateModel(
            name='Galeria',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('contenido',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
            ],
        ),
        migrations.CreateModel(
            name='Inmueble',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Propietario',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('apellidos', models.CharField(max_length=50)),
                ('rut', models.IntegerField(unique=True)),
                ('dv', models.CharField(max_length=1)),
                ('movil', models.IntegerField()),
                ('fijo', models.IntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Provincia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
            options={
                'ordering': ['nombre'],
            },
        ),
        migrations.CreateModel(
            name='Region',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
            ],
            options={
                'ordering': ['nombre'],
            },
        ),
        migrations.CreateModel(
            name='Requisito',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('descripcion', models.CharField(max_length=50)),
                ('cantidad', models.IntegerField()),
                ('obligatorio', models.BooleanField(default=True)),
                ('inmueble',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Inmueble')),
            ],
        ),
        migrations.CreateModel(
            name='Sector',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('comuna',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Comuna')),
                ('provincia',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Provincia')),
                ('region',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='publicacion.Region')),
            ],
        ),
        migrations.CreateModel(
            name='TipoContenido',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('descripcion', models.CharField(max_length=25)),
            ],
        ),
        migrations.CreateModel(
            name='TipoInmueble',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('descripcion', models.CharField(max_length=50)),
            ],
        ),
        migrations.AddField(
            model_name='provincia',
            name='region',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Region'),
        ),
        migrations.AddField(
            model_name='inmueble',
            name='propietario',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Propietario'),
        ),
        migrations.AddField(
            model_name='inmueble',
            name='tipo_inmueble',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.TipoInmueble'),
        ),
        migrations.AddField(
            model_name='galeria',
            name='inmueble',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Inmueble'),
        ),
        migrations.AddField(
            model_name='galeria',
            name='tipo_contenido',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.TipoContenido'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='propietario',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Propietario'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='provincia',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Provincia'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='region',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Region'),
        ),
        migrations.AddField(
            model_name='direccion',
            name='sector',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Sector'),
        ),
        migrations.AddField(
            model_name='comuna',
            name='provincia',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Provincia'),
        ),
        migrations.AddField(
            model_name='bitacoracontactos',
            name='cliente',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Cliente'),
        ),
        migrations.AddField(
            model_name='bitacoracontactos',
            name='inmueble',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Inmueble'),
        ),
        migrations.AddField(
            model_name='anuncio',
            name='inmueble',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='publicacion.Inmueble'),
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('awsomeProject', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('commentText', models.TextField()),
                ('created', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name='DeveloperGame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('url', models.URLField()),
                ('price', models.FloatField()),
                ('description', models.TextField(default=b'', max_length=300)),
                ('created', models.DateField(default=django.utils.timezone.now, editable=False)),
                ('category', models.CharField(choices=[(b'Action', b'Action'), (b'Adventure', b'Adventure'), (b'Sports', b'Sports'), (b'Strategy', b'Strategy'), (b'Puzzle', b'Puzzle')], default=b'Action', max_length=20)),
                ('image', cloudinary.models.CloudinaryField(max_length=255, verbose_name=b'image')),
            ],
        ),
        migrations.CreateModel(
            name='Gameplay',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.FloatField()),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game')),
            ],
        ),
        migrations.CreateModel(
            name='Photo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', cloudinary.models.CloudinaryField(max_length=255, verbose_name=b'image')),
            ],
        ),
        migrations.CreateModel(
            name='PlayerItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('itemName', models.CharField(max_length=255)),
                ('gameplay', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Gameplay')),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('rating', models.IntegerField()),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game')),
            ],
        ),
        migrations.CreateModel(
            name='Scores',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.FloatField()),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game')),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(default=django.utils.timezone.now, editable=False)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('isDeveloper', models.BooleanField()),
                ('key', models.CharField(default=b'', max_length=300)),
            ],
        ),
        migrations.AddField(
            model_name='transaction',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='scores',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='rating',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='gameplay',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='developergame',
            name='game',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game'),
        ),
        migrations.AddField(
            model_name='developergame',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='comment',
            name='game',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awsomeProject.Game'),
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
示例#9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            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=150,
                                  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')),
                ('name', models.CharField(blank=True, max_length=255)),
                ('email', models.EmailField(max_length=400)),
                ('profile_photo',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('status', tinymce.models.HTMLField(blank=True, null=True)),
                ('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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Business',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('business_name', models.CharField(max_length=300)),
                ('description', tinymce.models.HTMLField()),
                ('location', models.TextField(max_length=400)),
                ('email_address', models.EmailField(max_length=400)),
            ],
        ),
        migrations.CreateModel(
            name='Neighbourhood',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=250)),
                ('description', tinymce.models.HTMLField()),
                ('location', models.TextField(max_length=400)),
                ('occupants_count', models.IntegerField(blank=True,
                                                        default=0)),
                ('healthcentre_no', models.IntegerField(blank=True)),
                ('police_no', models.IntegerField(blank=True)),
                ('admin',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_hood',
                                   to=settings.AUTH_USER_MODEL)),
                ('business',
                 models.ManyToManyField(blank=True,
                                        related_name='hood_business',
                                        to='hood.Business')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('avatar',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('hood_name',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='profile_name',
                                   to='hood.neighbourhood')),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='hood.neighbourhood')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('subject', models.TextField(max_length=400)),
                ('description', tinymce.models.HTMLField()),
                ('hood_post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_posts',
                                   to='hood.neighbourhood')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_post_user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Join',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('hood_name',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_join',
                                   to='hood.neighbourhood')),
                ('location',
                 models.ForeignKey(default='',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_location_user',
                                   to='hood.neighbourhood')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='hood_join_user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='business',
            name='hood',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='business_in_hood',
                to='hood.neighbourhood'),
        ),
        migrations.AddField(
            model_name='business',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='customuser',
            name='neighbourhood',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='hood_user',
                to='hood.neighbourhood'),
        ),
        migrations.AddField(
            model_name='customuser',
            name='user_permissions',
            field=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'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('app', '0005_teammember'),
    ]

    operations = [
        migrations.CreateModel(
            name='DataEntry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=150)),
                ('movie', models.CharField(max_length=150)),
                ('intrument', models.CharField(max_length=100)),
                ('text', ckeditor.fields.RichTextField()),
                ('is_visible', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('published_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='ImageDataEntry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('published_at', models.DateTimeField(auto_now=True)),
                ('model',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app.DataEntry')),
            ],
        ),
        migrations.CreateModel(
            name='Observatory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('key', models.CharField(max_length=3)),
                ('is_visible', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('published_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AlterField(
            model_name='teammember',
            name='description',
            field=models.TextField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='teammember',
            name='email',
            field=models.EmailField(blank=True, max_length=254, null=True),
        ),
        migrations.AlterField(
            model_name='teammember',
            name='facebook',
            field=models.URLField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='teammember',
            name='googleplus',
            field=models.URLField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='teammember',
            name='site',
            field=models.URLField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name='teammember',
            name='twitter',
            field=models.URLField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='dataentry',
            name='observatory',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Observatory'),
        ),
    ]
示例#11
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='NewsLetterRecipients',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, max_length=25, null=True)),
                ('image', cloudinary.models.CloudinaryField(max_length=255, null=True, verbose_name='image')),
                ('link', models.URLField(blank=True, max_length=1000, null=True)),
                ('body', models.TextField(blank=True, max_length=300, null=True)),
                ('design', models.IntegerField(default=0)),
                ('usability', models.IntegerField(default=0)),
                ('content', models.IntegerField(default=0)),
                ('slug', models.SlugField(blank=True, max_length=200, null=True)),
                ('date', models.DateField(auto_now=True)),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('design', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10)])),
                ('usability', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10)])),
                ('content', models.PositiveIntegerField(default=0, validators=[django.core.validators.MaxValueValidator(10)])),
                ('review', models.TextField(blank=True, max_length=750, null=True)),
                ('review_date', models.DateField(auto_now_add=True)),
                ('rating', models.FloatField(validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(10)])),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='awwards.project')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_image', models.URLField(blank=True, default='https://res.cloudinary.com/mairura/image/upload/w_1000,c_fill,ar_1:1,g_auto,r_max,bo_5px_solid_red,b_rgb:262c35/v1605442723/p3t7keywhkmswljeuu9x.jpg', null=True)),
                ('bio', tinymce.models.HTMLField(blank=True, max_length=150, null=True)),
                ('contact', models.CharField(default=1234567800, max_length=10)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comments', models.TextField(max_length=400)),
                ('pro_id', models.IntegerField(default=0)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#12
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')),
                ('slug', models.SlugField(blank=True, unique=True)),
                ('avatar',
                 cloudinary.models.CloudinaryField(default='Esse/avatar.png',
                                                   max_length=255,
                                                   verbose_name='avatar')),
                ('status',
                 models.TextField(default='No status ...', max_length=350)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('friends',
                 models.ManyToManyField(blank=True,
                                        related_name='friends',
                                        to=settings.AUTH_USER_MODEL)),
                ('relations',
                 models.ManyToManyField(blank=True,
                                        related_name='relations',
                                        to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FriendRequest',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('status',
                 models.CharField(choices=[('Requested', 'Requested'),
                                           ('Confirmed', 'Confirmed')],
                                  max_length=9)),
                ('is_family', models.BooleanField(default=False)),
                ('from_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='from_user',
                                   to=settings.AUTH_USER_MODEL)),
                ('to_user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='to_user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='DynamicData',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('become_a_sponsor_url',
                 models.URLField(default='https://gdgzamboanga.herokuapp.com/',
                                 max_length=1000)),
                ('become_a_volunteer_url',
                 models.URLField(default='https://gdgzamboanga.herokuapp.com/',
                                 max_length=1000)),
                ('speaker_request_url',
                 models.URLField(default='https://gdgzamboanga.herokuapp.com/',
                                 max_length=1000)),
                ('media_kit_url',
                 models.URLField(default='https://gdgzamboanga.herokuapp.com/',
                                 max_length=1000)),
                ('photo_gallery_url',
                 models.URLField(default='https://gdgzamboanga.herokuapp.com/',
                                 max_length=1000)),
                ('about_us', models.TextField(default='GDG Zamboanga')),
                ('google_plus_link',
                 models.URLField(default='https://plus.google.com/',
                                 max_length=300)),
                ('facebook_link',
                 models.URLField(default='https://facebook.com/',
                                 max_length=300)),
                ('twitter_link',
                 models.URLField(default='https://twitter.com',
                                 max_length=300)),
                ('youtube_link',
                 models.URLField(default='https://youtube.com',
                                 max_length=300)),
                ('instagram_link',
                 models.URLField(default='https://instagram.com',
                                 max_length=300)),
                ('meetup_link',
                 models.URLField(default='https://meetup.com',
                                 max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='SiteCarousel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
            ],
        ),
        migrations.CreateModel(
            name='Subscriber',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('email', models.EmailField(max_length=200)),
                ('code', models.CharField(max_length=100)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='UserAccount',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.CharField(default='Blog Creator', max_length=120)),
                ('activated', models.BooleanField(default=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('member',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='team.Member')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('description', models.TextField()),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#14
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('details', models.TextField()),
                ('link', models.CharField(max_length=100)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('user_project_id', models.IntegerField(default=0)),
                ('design',
                 models.IntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3),
                                              (4, 4), (5, 5), (6, 6), (7, 7),
                                              (8, 8), (9, 9), (10, 10)],
                                     default=0)),
                ('usability',
                 models.IntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3),
                                              (4, 4), (5, 5), (6, 6), (7, 7),
                                              (8, 8), (9, 9), (10, 10)],
                                     default=0)),
                ('creativity',
                 models.IntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3),
                                              (4, 4), (5, 5), (6, 6), (7, 7),
                                              (8, 8), (9, 9), (10, 10)],
                                     default=0)),
                ('content',
                 models.IntegerField(choices=[(0, 0), (1, 1), (2, 2), (3, 3),
                                              (4, 4), (5, 5), (6, 6), (7, 7),
                                              (8, 8), (9, 9), (10, 10)],
                                     default=0)),
                ('vote_submissions', models.IntegerField(default=0)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'projects',
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Rate',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('design',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('usability',
                 models.IntegerField(
                     null=True,
                     validators=[
                         django.core.validators.MinValueValidator(1),
                         django.core.validators.MaxValueValidator(10)
                     ])),
                ('creativity',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('content',
                 models.IntegerField(validators=[
                     django.core.validators.MinValueValidator(1),
                     django.core.validators.MaxValueValidator(10)
                 ])),
                ('average', models.IntegerField(default=0)),
                ('post',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   related_name='likes',
                                   to='posts.Project')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'ratings',
            },
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_picture',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('bio', models.TextField(default='bio')),
                ('contact', models.CharField(blank=True, max_length=200)),
                ('profile_Id', models.IntegerField(default=0)),
                ('all_projects',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='posts.Project')),
                ('user_profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='profile',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'profiles',
            },
        ),
    ]
示例#15
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('project_image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('description', models.TextField()),
                ('live_link', models.CharField(max_length=100)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='project',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('design', models.IntegerField()),
                ('usability', models.IntegerField()),
                ('content', models.IntegerField()),
                ('project',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='projectrating',
                                   to='api.Project')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='rating',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_picture',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('profile_bio', models.TextField()),
                ('contact_info', models.EmailField(max_length=254)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#16
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')),
                ('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')),
                ('first_name', models.CharField(blank=True, max_length=200, null=True)),
                ('last_name', models.CharField(blank=True, max_length=200, null=True)),
                ('phone_number', models.CharField(blank=True, max_length=12, null=True, unique=True)),
                ('whatsapp_number', models.CharField(blank=True, max_length=12, null=True, unique=True)),
                ('is_merchant', models.BooleanField(default=True)),
                ('business_name', models.CharField(blank=True, max_length=200, null=True, unique=True)),
                ('business_description', models.TextField(max_length=300)),
                ('address', models.CharField(blank=True, max_length=200, null=True)),
                ('confirmed_payment', models.BooleanField(default=False)),
                ('date_created', models.DateField(default=django.utils.timezone.now)),
                ('subscription_expired', 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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
                ('details', models.CharField(default='Default', max_length=200)),
                ('image', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('date_created', models.DateTimeField(default=django.utils.timezone.now)),
            ],
            options={
                'ordering': ['-date_created'],
            },
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=200, null=True, unique=True)),
                ('alias', models.CharField(blank=True, max_length=200, unique=True)),
                ('state', models.CharField(blank=True, max_length=200, null=True)),
                ('hotspots', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=200), default=list, size=50)),
            ],
        ),
        migrations.CreateModel(
            name='SubCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('date_created', models.DateTimeField(blank=True, default=django.utils.timezone.now)),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Category')),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', cloudinary.models.CloudinaryField(max_length=255, verbose_name='image')),
                ('dropoff_point', models.CharField(blank=True, max_length=100, null=True)),
                ('name', models.CharField(max_length=70)),
                ('description', models.TextField(max_length=250)),
                ('price', models.FloatField()),
                ('views', models.IntegerField(default=0)),
                ('published_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.SubCategory')),
                ('merchant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('school', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.School')),
            ],
            options={
                'ordering': ['-published_date'],
            },
        ),
        migrations.AddField(
            model_name='user',
            name='school',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.School'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=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'),
        ),
    ]
示例#17
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='AwardsProject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=60)),
                ('pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='pic')),
                ('description', models.TextField()),
                ('link', models.URLField(max_length=300)),
            ],
        ),
        migrations.CreateModel(
            name='MoringaMerch',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(blank=True, max_length=60, null=True)),
                ('pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='pic')),
                ('bio', models.TextField(blank=True, null=True)),
                ('email', models.EmailField(max_length=254, null=True)),
                ('user',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name',
                 models.CharField(blank=True, max_length=60, null=True)),
                ('last_name',
                 models.CharField(blank=True, max_length=60, null=True)),
                ('pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='pic')),
                ('bio', models.TextField(blank=True, null=True)),
                ('likes', models.IntegerField(default=0)),
                ('email', models.EmailField(max_length=254, null=True)),
                ('phone_number',
                 phonenumber_field.modelfields.PhoneNumberField(max_length=128,
                                                                null=True,
                                                                region=None)),
                ('user',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['first_name'],
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=60)),
                ('pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   null=True,
                                                   verbose_name='pic')),
                ('description', models.TextField()),
                ('link', models.URLField(max_length=300)),
            ],
            options={
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField()),
                ('design_rating',
                 models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'),
                                              (4, '4'), (5, '5'), (6, '6'),
                                              (7, '7'), (8, '8'), (9, '9'),
                                              (10, '10')],
                                     default=0)),
                ('usability_rating',
                 models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'),
                                              (4, '4'), (5, '5'), (6, '6'),
                                              (7, '7'), (8, '8'), (9, '9'),
                                              (10, '10')],
                                     default=0)),
                ('content_rating',
                 models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'),
                                              (4, '4'), (5, '5'), (6, '6'),
                                              (7, '7'), (8, '8'), (9, '9'),
                                              (10, '10')],
                                     default=0)),
                ('project',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='reviews',
                                   to='awards.Project')),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='reviews',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#18
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='images')),
                ('description', models.CharField(blank=True, max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='profpics')),
                ('bio', models.TextField(blank=True)),
                ('user_id',
                 models.OneToOneField(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Projects',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('project_name', models.CharField(blank=True, max_length=50)),
                ('project_photo',
                 cloudinary.models.CloudinaryField(
                     max_length=255, verbose_name='projectpics/')),
                ('description', models.TextField(blank=True, max_length=400)),
                ('github_repo', models.CharField(blank=True, max_length=150)),
                ('url', models.CharField(blank=True, max_length=60)),
                ('uploader',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#19
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('activity_id',
                 models.BigAutoField(primary_key=True, serialize=False)),
                ('activity', models.CharField(db_index=True, max_length=100)),
            ],
            options={
                'verbose_name_plural': 'activities',
            },
        ),
        migrations.CreateModel(
            name='ActivityType',
            fields=[
                ('activity_type_id',
                 models.BigIntegerField(primary_key=True, serialize=False)),
                ('activity_type',
                 models.CharField(db_index=True, max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='UserActivity',
            fields=[
                ('user_activity_id',
                 models.BigAutoField(primary_key=True, serialize=False)),
                ('location', models.CharField(max_length=200)),
                ('lat', models.CharField(max_length=100)),
                ('lon', models.CharField(max_length=100)),
                ('monday', models.BooleanField(default=True)),
                ('tuesday', models.BooleanField(default=True)),
                ('wednesday', models.BooleanField(default=True)),
                ('thursday', models.BooleanField(default=True)),
                ('friday', models.BooleanField(default=True)),
                ('saturday', models.BooleanField(default=False)),
                ('sunday', models.BooleanField(default=False)),
                ('open_from', models.TimeField()),
                ('open_to', models.TimeField()),
                ('description', models.CharField(max_length=350)),
                ('activity',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.Activity')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserActivityAlbum',
            fields=[
                ('user_activity_album_id',
                 models.BigAutoField(primary_key=True, serialize=False)),
                ('photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('user_activity',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.UserActivity')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('gender',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  default='M',
                                  max_length=1)),
                ('location',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('join_date', models.DateField(auto_now_add=True)),
                ('phone', models.CharField(blank=True,
                                           max_length=20,
                                           null=True)),
                ('score',
                 models.DecimalField(blank=True,
                                     decimal_places=4,
                                     max_digits=10,
                                     null=True)),
                ('profile_picture',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Deal',
            fields=[
                ('deal_id',
                 models.BigAutoField(primary_key=True, serialize=False)),
                ('request_date', models.DateTimeField(auto_now_add=True)),
                ('request_modified', models.DateTimeField(auto_now=True)),
                ('status',
                 models.CharField(choices=[('R', 'Request'), ('A', 'Accepted'),
                                           ('D', 'Declined'),
                                           ('F', 'Finished')],
                                  default='R',
                                  max_length=1)),
                ('rating', models.IntegerField(default=5)),
                ('review', models.TextField(blank=True, null=True)),
                ('request_from',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('request_to',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='request_to',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='activity',
            name='activity_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='main.ActivityType'),
        ),
    ]
示例#20
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField(null=True)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_comment',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('location',
                 models.CharField(blank=True, max_length=50, null=True)),
                ('bio', models.TextField(max_length=120, null=True)),
                ('avatar',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('pictures',
                 models.ImageField(null=True,
                                   upload_to=insta.models.user_directory_path,
                                   verbose_name='Picture')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Stream',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateTimeField()),
                ('following',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='stream_following',
                                   to=settings.AUTH_USER_MODEL)),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='insta.profile')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('image',
                 models.ImageField(null=True,
                                   upload_to=insta.models.user_directory_path,
                                   verbose_name='Picture')),
                ('image_name', models.CharField(max_length=120, null=True)),
                ('caption',
                 models.TextField(max_length=1000,
                                  null=True,
                                  verbose_name='Caption')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('like', models.IntegerField(default=0)),
                ('comment',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_comment',
                                   to='insta.comment')),
                ('profile',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_profile',
                                   to='insta.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Likes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post_like',
                                   to='insta.post')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='user_like',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('follower',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='follower',
                                   to=settings.AUTH_USER_MODEL)),
                ('following',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='following',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#21
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('HMS', '0004_auto_20180420_1206'),
    ]

    operations = [
        migrations.RenameModel(
            old_name='Registeration',
            new_name='Booking',
        ),
        migrations.AlterModelOptions(
            name='booking',
            options={
                'verbose_name': 'Booking',
                'verbose_name_plural': 'Bookings'
            },
        ),
        migrations.AlterModelOptions(
            name='room',
            options={
                'ordering': ['room_number', 'room_type'],
                'verbose_name': 'Room',
                'verbose_name_plural': 'Rooms'
            },
        ),
        migrations.AlterModelOptions(
            name='roomtype',
            options={
                'ordering': ['type_id', 'type_name'],
                'verbose_name': 'Room Type',
                'verbose_name_plural': 'Room Types'
            },
        ),
        migrations.AddField(
            model_name='profile',
            name='profile_pic',
            field=cloudinary.models.CloudinaryField(
                blank=True, max_length=255, verbose_name='profile picture'),
        ),
        migrations.AlterField(
            model_name='image',
            name='description',
            field=models.CharField(blank=True, max_length=1000),
        ),
        migrations.AlterField(
            model_name='image',
            name='room_number',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='images',
                to='HMS.Room'),
        ),
        migrations.AlterField(
            model_name='room',
            name='price',
            field=models.IntegerField(help_text='Enter the price of the room',
                                      verbose_name='Price of the room'),
        ),
    ]
示例#22
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
                ('url', models.URLField(unique=True)),
                ('price', models.DecimalField(decimal_places=2, default=0, max_digits=8)),
                ('logo', cloudinary.models.CloudinaryField(blank=True, max_length=255, null=True, verbose_name='logo')),
                ('banner', cloudinary.models.CloudinaryField(blank=True, max_length=255, null=True, verbose_name='banner')),
                ('description', models.TextField(blank=True, max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='GameReview',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('review_text', models.TextField(blank=True, max_length=500)),
                ('review_star', models.IntegerField(default=0)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.Game')),
            ],
        ),
        migrations.CreateModel(
            name='GameSale',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('time_of_purchase', models.DateTimeField(auto_now_add=True)),
                ('ref', models.IntegerField()),
                ('pid', models.CharField(max_length=20)),
                ('price_paid', models.DecimalField(decimal_places=2, default=0, max_digits=8)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.Game')),
            ],
        ),
        migrations.CreateModel(
            name='PurchasedGame',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('game_state', models.CharField(blank=True, default='', max_length=10000)),
                ('high_score', models.IntegerField(default=0)),
                ('game', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.Game')),
            ],
        ),
        migrations.CreateModel(
            name='RegUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('developer', models.BooleanField(default=False)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='purchasedgame',
            name='player',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.RegUser'),
        ),
        migrations.AddField(
            model_name='gamereview',
            name='reviewer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.RegUser'),
        ),
        migrations.AddField(
            model_name='game',
            name='developer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gamestore.RegUser'),
        ),
        migrations.AddField(
            model_name='game',
            name='tags',
            field=models.ManyToManyField(blank=True, to='gamestore.Tag'),
        ),
    ]
示例#23
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Artist',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mailing_address',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='Mailing_Address')),
                ('instagram', models.URLField(blank=True, null=True)),
                ('facebook', models.URLField(blank=True, null=True)),
                ('twitter', models.URLField(blank=True, null=True)),
                ('image_artist',
                 cloudinary.models.CloudinaryField(
                     default=
                     'https://res.cloudinary.com/dqj36cjxw/image/upload/v1607600679/Rectangle_52_jiszkm.png',
                     max_length=255,
                     verbose_name='Profile')),
                ('user',
                 models.OneToOneField(
                     blank=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='BillingAdress',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('street_adress', models.CharField(max_length=200)),
                ('apartment_adress', models.CharField(max_length=200)),
                ('zip', models.CharField(max_length=200)),
                ('country',
                 django_countries.fields.CountryField(max_length=2)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('price', models.FloatField()),
                ('discount_price',
                 models.FloatField(blank=True, default=0, null=True)),
                ('category',
                 models.CharField(choices=[('Pa', 'Painting'),
                                           ('Ph', 'photograph'),
                                           ('sc', 'sculpture'),
                                           ('pr', 'prints')],
                                  max_length=2)),
                ('label',
                 models.CharField(choices=[('P', 'primary'),
                                           ('S', 'secondary'),
                                           ('D', 'danger')],
                                  max_length=2)),
                ('slug', models.SlugField(unique=True, verbose_name='Tag')),
                ('description', models.TextField()),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('artist',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Artist')),
                ('likes',
                 models.ManyToManyField(blank=True,
                                        related_name='likes',
                                        to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Show',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('date', models.DateField()),
                ('time', models.TimeField()),
                ('location', models.CharField(max_length=100)),
                ('RSVP', models.CharField(max_length=100)),
                ('poster',
                 cloudinary.models.CloudinaryField(
                     default=
                     'https://res.cloudinary.com/dqj36cjxw/image/upload/v1609854605/uis0nvmmwdkfkhydtenu.jpg',
                     max_length=255,
                     verbose_name='Poster')),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PaymentDetails',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True,
                                          max_length=100,
                                          null=True)),
                ('cardno',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('expiry_date',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('billing_adress',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('CITY', models.CharField(blank=True,
                                          max_length=100,
                                          null=True)),
                ('user',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Payment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('stripe_charge_id', models.CharField(max_length=100)),
                ('amount', models.FloatField()),
                ('time_stamp', models.DateTimeField()),
                ('billing_adress',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='core.BillingAdress')),
                ('user',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ordered', models.BooleanField(default=False)),
                ('status', models.BooleanField(default=False)),
                ('quantity', models.IntegerField(default=1)),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='core.Item')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('date_ordered', models.DateTimeField()),
                ('ordered', models.BooleanField(default=False)),
                ('billing_adress',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='core.BillingAdress')),
                ('items', models.ManyToManyField(to='core.OrderItem')),
                ('payment',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='core.Payment')),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Gallery',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('host_name',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('gallery_email',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('gallery_number',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('gallery_address',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('city_state_zip_code',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('gallery_website',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Chat',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message', models.TextField(blank=True, null=True)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('reciever',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='send_to',
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='To')),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='sender',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('buyer', models.BooleanField(default=False)),
                ('seller', models.BooleanField(default=False)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#24
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(max_length=255)),
                ('last_name', models.CharField(max_length=255)),
                ('phone', models.CharField(max_length=20)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Shift',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='scheduling.Company')),
            ],
        ),
        migrations.CreateModel(
            name='TimeFrame',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start', models.TimeField()),
                ('end', models.TimeField()),
                ('shift',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='scheduling.Shift')),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('duration', models.TimeField()),
                ('description',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='scheduling.Company')),
            ],
        ),
        migrations.CreateModel(
            name='Schedule',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('fri',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='fri',
                     to='scheduling.Shift')),
                ('mon',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='mon',
                     to='scheduling.Shift')),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='scheduling.Company')),
                ('sat',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='sat',
                     to='scheduling.Shift')),
                ('sun',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='sun',
                     to='scheduling.Shift')),
                ('thu',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='thu',
                     to='scheduling.Shift')),
                ('tue',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='tue',
                     to='scheduling.Shift')),
                ('wed',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='wed',
                     to='scheduling.Shift')),
            ],
        ),
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('person_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='scheduling.Person')),
                ('instagram', models.CharField(max_length=200, null=True)),
                ('profile_img',
                 cloudinary.models.CloudinaryField(blank=True,
                                                   max_length=255,
                                                   null=True,
                                                   verbose_name='image')),
                ('bio', models.TextField(blank=True, max_length=600,
                                         null=True)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='scheduling.Company')),
                ('schedule',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='scheduling.Schedule')),
                ('services', models.ManyToManyField(to='scheduling.Service')),
            ],
            bases=('scheduling.person', ),
        ),
        migrations.CreateModel(
            name='Appointment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start', models.DateTimeField()),
                ('end', models.DateTimeField()),
                ('status',
                 models.CharField(choices=[('P', 'Pending'), ('A', 'Accepted'),
                                           ('R', 'Rejected')],
                                  default='P',
                                  max_length=1)),
                ('customer_notes',
                 models.TextField(blank=True, max_length=255, null=True)),
                ('customer',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='service_received',
                                   to='scheduling.Person')),
                ('service',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='scheduling.Service')),
                ('employee',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='service_provided',
                                   to='scheduling.Employee')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('time_created',
                 models.DateTimeField(blank=True,
                                      default=datetime.datetime.now)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('message', models.CharField(blank=True, max_length=80)),
                ('name', models.CharField(max_length=80)),
                ('caption', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_pic',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('bio', models.CharField(blank=True, max_length=50)),
                ('user',
                 models.OneToOneField(
                     blank=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Likes',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='insta.image')),
                ('likes',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='image',
            name='profile',
            field=models.ForeignKey(
                blank=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='insta.profile'),
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField()),
                ('comment_title',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('image',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comment',
                                   to='insta.image')),
            ],
        ),
    ]
示例#26
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Brand',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('description', models.TextField()),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('description', models.TextField()),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('content', models.CharField(max_length=30)),
                ('price', models.DecimalField(decimal_places=2, max_digits=8)),
                ('bva_volume', models.PositiveIntegerField()),
                ('category',
                 models.CharField(choices=[('01', 'Spirits'), ('02', 'Wines'),
                                           ('03', 'Beers'),
                                           ('04', 'Gas carnisters'),
                                           ('05', 'Internationals'),
                                           ('06', 'Beverages/non alcoholic')],
                                  max_length=20)),
                ('quantity', models.PositiveIntegerField()),
                ('available', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('brand',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='base.brand')),
            ],
        ),
        migrations.CreateModel(
            name='ProductImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('product',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='base.product')),
            ],
        ),
    ]
示例#27
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')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('bio', models.CharField(max_length=255)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'profile',
            },
        ),
        migrations.CreateModel(
            name='Projects',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('description', models.TextField()),
                ('created_date',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('title', models.CharField(max_length=255)),
                ('link', models.URLField()),
                ('author',
                 models.ForeignKey(blank=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
                ('author_profile',
                 models.ForeignKey(blank=True,
                                   default='1',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='posts.profile')),
            ],
            options={
                'db_table': 'project',
                'ordering': ['-created_date'],
            },
        ),
    ]
示例#28
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')),
                ('photo',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='images')),
                ('Bio', models.CharField(max_length=30)),
                ('datecreated', models.DateField(auto_now_add=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Projects',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=30)),
                ('description', models.TextField(max_length=300)),
                ('projectscreenshot',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='images')),
                ('projecturl', models.URLField()),
                ('datecreated', models.DateField(auto_now_add=True)),
                ('user',
                 models.ForeignKey(default='',
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='author',
                                   to='projects.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Revieww',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField(auto_now_add=True)),
                ('text', models.TextField(blank=True, max_length=3000)),
                ('design',
                 models.PositiveSmallIntegerField(choices=[
                     (1, '1- Trash'), (2, '2- Horrible'), (3, '3- Terrible'),
                     (4, '4- Bad'), (5, '5- Ok'), (6, '6- Watchable'),
                     (7, '7- Good'), (8, '8- Very Good'), (9, '9- perfect'),
                     (10, '10- Master Piece')
                 ],
                                                  default=0)),
                ('usability',
                 models.PositiveSmallIntegerField(choices=[
                     (1, '1- Trash'), (2, '2- Horrible'), (3, '3- Terrible'),
                     (4, '4- Bad'), (5, '5- Ok'), (6, '6- Watchable'),
                     (7, '7- Good'), (8, '8- Very Good'), (9, '9- perfect'),
                     (10, '10- Master Piece')
                 ],
                                                  default=0)),
                ('content',
                 models.PositiveSmallIntegerField(choices=[
                     (1, '1- Trash'), (2, '2- Horrible'), (3, '3- Terrible'),
                     (4, '4- Bad'), (5, '5- Ok'), (6, '6- Watchable'),
                     (7, '7- Good'), (8, '8- Very Good'), (9, '9- perfect'),
                     (10, '10- Master Piece')
                 ],
                                                  default=0)),
                ('projects',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='projects.projects')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
示例#29
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')),
                ('profile_pic',
                 models.ImageField(default='default.png', upload_to='media/')),
                ('bio',
                 models.TextField(blank=True, default='My Bio',
                                  max_length=350)),
                ('name', models.CharField(blank=True, max_length=150)),
                ('location', models.CharField(blank=True, max_length=50)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=250)),
                ('caption', models.CharField(blank=True, max_length=250)),
                ('created', models.DateTimeField(auto_now_add=True,
                                                 null=True)),
                ('image',
                 cloudinary.models.CloudinaryField(max_length=255,
                                                   verbose_name='image')),
                ('likes',
                 models.ManyToManyField(blank=True,
                                        related_name='likes',
                                        to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='posts',
                                   to='instaClone.profile')),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
        migrations.CreateModel(
            name='Follow',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('followed',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='followers',
                                   to='instaClone.profile')),
                ('follower',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='following',
                                   to='instaClone.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.TextField()),
                ('created', models.DateTimeField(auto_now_add=True,
                                                 null=True)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='instaClone.post')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comments',
                                   to='instaClone.profile')),
            ],
            options={
                'ordering': ['-pk'],
            },
        ),
    ]
示例#30
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('start_date', models.DateField()),
                ('end_date', models.DateField()),
                ('price', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('password', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Images',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('url',
                 cloudinary.models.CloudinaryField(
                     blank=True,
                     max_length=255,
                     verbose_name='profile picture')),
            ],
        ),
        migrations.CreateModel(
            name='profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('profile_pic',
                 cloudinary.models.CloudinaryField(
                     blank=True,
                     max_length=255,
                     verbose_name='profile picture')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Review',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('review',
                 models.CharField(help_text='Enter comments', max_length=100)),
                ('rating', models.PositiveIntegerField()),
                ('user_id',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Room',
            fields=[
                ('room_no', models.AutoField(primary_key=True,
                                             serialize=False)),
            ],
        ),
        migrations.CreateModel(
            name='Type',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name',
                 models.CharField(help_text='Enter name of the room',
                                  max_length=60)),
                ('capacity', models.IntegerField()),
                ('price',
                 models.IntegerField(
                     help_text='Enter price for per day stay')),
                ('wifi_service', models.BooleanField()),
                ('breakfast_service', models.BooleanField()),
                ('spa_service', models.BooleanField()),
                ('room_service', models.BooleanField()),
                ('minibar_service', models.BooleanField()),
                ('gym_service', models.BooleanField()),
                ('pool_service', models.BooleanField()),
            ],
            options={
                'ordering': ['id'],
            },
        ),
        migrations.AddField(
            model_name='room',
            name='type',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='megamaninn.Type'),
        ),
        migrations.AddField(
            model_name='images',
            name='room_type_id',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='megamaninn.Type'),
        ),
        migrations.AddField(
            model_name='booking',
            name='room_no',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='megamaninn.Room'),
        ),
    ]