Exemplo n.º 1
3
def dependency(app_label, model):
    """
    Returns a Django 1.7+ style dependency tuple for inclusion in
    migration.dependencies[]
    """
    from django.db.migrations import swappable_dependency
    return swappable_dependency(get_model_name(app_label, model))
Exemplo n.º 2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CategoryImmobilier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('category', models.CharField(max_length=255)),
                ('sous_category', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='ImageAnnonceImmobilier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image1',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='media/immobilier/%Y-%m-%d/')),
                ('image2',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='media/immobilier/%Y-%m-%d/')),
                ('image3',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='media/immobilier/%Y-%m-%d/')),
                ('image4',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='media/immobilier/%Y-%m-%d/')),
                ('image5',
                 models.ImageField(blank=True,
                                   null=True,
                                   upload_to='media/immobilier/%Y-%m-%d/')),
            ],
        ),
        migrations.CreateModel(
            name='PriceNature',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('price_nature', models.CharField(max_length=120)),
            ],
        ),
        migrations.CreateModel(
            name='ServiceImmobilier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(help_text='Title',
                                           max_length=1024)),
                ('description', models.TextField(help_text='Describe it')),
                ('price', models.IntegerField(help_text='price fcfa')),
                ('coordinate',
                 models.CharField(help_text='Coord getting with GMap',
                                  max_length=255)),
                ('document',
                 models.FileField(help_text='relatice document url',
                                  upload_to='')),
                ('date_created',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      editable=False)),
                ('cateroy',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.CategoryImmobilier')),
                ('image',
                 models.ManyToManyField(to='api.ImageAnnonceImmobilier')),
                ('price_nature',
                 models.ForeignKey(help_text='Price nature',
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='api.PriceNature')),
                ('publisher',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='Ownner',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ContracteurImmobilier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('annonce',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='serviceImmoContract',
                                   to='api.ServiceImmobilier')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='UserContracteur',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='AnnonceurImmobilier',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('annonce',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='ServiceImmoAnnounce',
                                   to='api.ServiceImmobilier')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='UserAnnonceur',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 3
0

        
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Ethnic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Language', models.CharField(max_length=35)),
            ],
        ),
        migrations.CreateModel(
            name='Events',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Event_Type', models.CharField(max_length=35)),
            ],
        ),
        migrations.CreateModel(
            name='Speakers',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('picture', models.FileField(upload_to='')),
                ('owner', models.CharField(blank=True, max_length=30)),
                ('desc', models.CharField(blank=True, max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Planner',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('picture', models.FileField(upload_to='')),
                ('Age', models.IntegerField()),
                ('event_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='STalk.Events')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Mc',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Mc_name', models.CharField(max_length=50)),
                ('age', models.IntegerField()),
                ('picture', models.FileField(upload_to='')),
                ('ethnic', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='STalk.Ethnic')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Hype',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('picture', models.FileField(upload_to='')),
                ('event_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='STalk.Events')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Deejay',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('DJ_name', models.CharField(max_length=50)),
                ('age', models.IntegerField()),
                ('picture', models.FileField(upload_to='')),
                ('music_type', models.TextField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('street_address', models.CharField(max_length=100)),
                ('apartment_address', models.CharField(max_length=100)),
                ('country',
                 django_countries.fields.CountryField(max_length=2)),
                ('zip_address', models.CharField(max_length=100)),
                ('address_type',
                 models.CharField(choices=[('S', 'Shipping'),
                                           ('B', 'Billing')],
                                  max_length=1)),
                ('default', models.BooleanField(default=False)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Addresses',
            },
        ),
        migrations.CreateModel(
            name='Coupon',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=15)),
                ('amount', models.FloatField()),
            ],
        ),
        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)),
                ('price', models.FloatField()),
                ('discount_price', models.FloatField(blank=True, null=True)),
                ('category',
                 models.CharField(choices=[('S', 'Shirt'),
                                           ('SW', 'Sport wear'),
                                           ('OW', 'Outwear')],
                                  max_length=2)),
                ('label',
                 models.CharField(choices=[('P', 'primary'),
                                           ('S', 'secondary'),
                                           ('D', 'danger')],
                                  max_length=1)),
                ('slug', models.SlugField()),
                ('description', models.TextField()),
                ('image', models.ImageField(upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ref_code', models.CharField(max_length=20)),
                ('start_date', models.DateTimeField(auto_now_add=True)),
                ('ordered_date', models.DateTimeField()),
                ('ordered', models.BooleanField(default=False)),
                ('being_delivered', models.BooleanField(default=False)),
                ('received', models.BooleanField(default=False)),
                ('refund_requested', models.BooleanField(default=False)),
                ('refund_granted', models.BooleanField(default=False)),
                ('billing_address',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='billing_address',
                     to='main.Address')),
                ('coupon',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='main.Coupon')),
            ],
        ),
        migrations.CreateModel(
            name='Refund',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('message', models.TextField()),
                ('email', models.EmailField(max_length=254)),
                ('accepted', models.BooleanField(default=False)),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.Order')),
            ],
        ),
        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=50)),
                ('amount', models.FloatField()),
                ('timestamp', models.DateField(auto_now_add=True)),
                ('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')),
                ('quantity', models.IntegerField(default=1)),
                ('ordered', models.BooleanField(default=False)),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='main.Item')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='items',
            field=models.ManyToManyField(to='main.OrderItem'),
        ),
        migrations.AddField(
            model_name='order',
            name='payment',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='main.Payment'),
        ),
        migrations.AddField(
            model_name='order',
            name='shipping_address',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='shipping_address',
                to='main.Address'),
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Crop',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('photo', models.ImageField(upload_to=core.models.crop_image_save_loc)),
                ('description', models.TextField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='Expert',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('phone', models.CharField(blank=True, max_length=17, null=True, validators=[django.core.validators.RegexValidator(message="Phone number must be entered in the format: '+999999999'. Up to 15 digits allowed.", regex='^\\+?1?\\d{9,15}$')])),
                ('city', models.CharField(max_length=32)),
                ('state', models.CharField(max_length=32)),
                ('job', models.CharField(choices=[('student', 'Student'), ('govt', 'Government')], max_length=7)),
            ],
        ),
        migrations.CreateModel(
            name='Farmer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=96)),
                ('language', models.CharField(default='en', max_length=10)),
                ('state', models.CharField(max_length=32)),
                ('district', models.CharField(max_length=32)),
                ('joined', models.DateTimeField(auto_now_add=True)),
                ('level', models.IntegerField(default=0)),
                ('land_area', models.IntegerField(default=0, verbose_name='in hectares')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FarmerCropYield',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('yield_potential', models.IntegerField(default=0, verbose_name='in kg')),
                ('yield_effective', models.IntegerField(verbose_name='in kg')),
                ('yield_wastage', models.IntegerField(default=0, verbose_name='in kg')),
                ('cultivated_area', models.IntegerField(verbose_name='in hectares')),
                ('pesticides_used', models.IntegerField(default=0, verbose_name='in kg')),
                ('investment', models.IntegerField(verbose_name='in Rs.')),
                ('profit', models.IntegerField(verbose_name='in Rs.')),
                ('crop', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='yields', related_query_name='yield', to='core.Crop')),
                ('farmer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='crops', related_query_name='crop', to='core.Farmer')),
            ],
        ),
        migrations.CreateModel(
            name='Equipment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('photo', models.ImageField(upload_to=core.models.equipment_image_save_loc)),
                ('rental_price', models.IntegerField(default=0, verbose_name='in Rs.')),
                ('rental_days', models.IntegerField(default=0)),
                ('start_dt', models.DateTimeField()),
                ('end_dt', models.DateTimeField(null=True)),
                ('category', models.PositiveSmallIntegerField(choices=[(0, 'None'), (1, 'Tractor'), (2, 'Storage')])),
                ('farmer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Farmer')),
            ],
        ),
    ]
Exemplo n.º 7
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('message', models.TextField()),
                ('url', models.URLField(null=True, verbose_name='link for notification', blank=True)),
                ('is_viewed', models.BooleanField(default=False)),
                ('is_emailed', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'notify_notification',
                'verbose_name': 'notification',
                'verbose_name_plural': 'notifications',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='NotificationType',
            fields=[
                ('key', models.CharField(max_length=128, unique=True, serialize=False, verbose_name='unique key', primary_key=True)),
                ('label', models.CharField(max_length=128, null=True, verbose_name='verbose name', blank=True)),
                ('content_type', models.ForeignKey(blank=True, to='contenttypes.ContentType', null=True)),
            ],
            options={
                'db_table': 'notify_notificationtype',
                'verbose_name': 'type',
                'verbose_name_plural': 'types',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Settings',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('interval', models.SmallIntegerField(default=0, verbose_name='interval', choices=[(0, 'instantly'), (23, 'daily'), (167, 'weekly')])),
                ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'notify_settings',
                'verbose_name': 'settings',
                'verbose_name_plural': 'settings',
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
                ('subscription_id', models.AutoField(serialize=False, primary_key=True)),
                ('object_id', models.CharField(help_text='Leave this blank to subscribe to any kind of object', max_length=64, null=True, blank=True)),
                ('send_emails', models.BooleanField(default=True)),
                ('notification_type', models.ForeignKey(to='django_notify.NotificationType')),
                ('settings', models.ForeignKey(to='django_notify.Settings')),
            ],
            options={
                'db_table': 'notify_subscription',
                'verbose_name': 'subscription',
                'verbose_name_plural': 'subscriptions',
            },
            bases=(models.Model,),
        ),
        migrations.AddField(
            model_name='notification',
            name='subscription',
            field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, blank=True, to='django_notify.Subscription', null=True),
            preserve_default=True,
        ),
    ]
Exemplo n.º 8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('taggit', '0002_auto_20150616_2121'),
        ('wagtailimages', '0012_copy_image_permissions_to_collections'),
        ('comments', '0002_auto_20160411_1006'),
        ('wagtailcore', '0028_merge'),
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('city', models.CharField(max_length=40, verbose_name='stad')),
                ('postal_code',
                 models.CharField(max_length=8,
                                  null=True,
                                  verbose_name='postcode')),
                ('street',
                 models.CharField(max_length=40,
                                  null=True,
                                  verbose_name='straat')),
                ('number',
                 models.CharField(max_length=8,
                                  null=True,
                                  verbose_name='nummer')),
                ('country',
                 django_countries.fields.CountryField(default='BE',
                                                      max_length=2,
                                                      null=True,
                                                      verbose_name='land')),
            ],
            options={
                'verbose_name_plural': 'adressen',
                'verbose_name': 'adres',
            },
        ),
        migrations.CreateModel(
            name='CommentSnippet',
            fields=[
                ('commentwithtitle_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='comments.CommentWithTitle')),
            ],
            options={
                'verbose_name_plural': 'comments',
                'abstract': False,
                'permissions': [('can_moderate', 'Can moderate comments')],
                'verbose_name': 'comment',
                'ordering': ('submit_date', ),
            },
            bases=('comments.commentwithtitle', ),
        ),
        migrations.CreateModel(
            name='CustomImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=255,
                                           verbose_name='title')),
                ('file',
                 models.ImageField(
                     height_field='height',
                     upload_to=wagtail.wagtailimages.models.get_upload_to,
                     verbose_name='file',
                     width_field='width')),
                ('width',
                 models.IntegerField(editable=False, verbose_name='width')),
                ('height',
                 models.IntegerField(editable=False, verbose_name='height')),
                ('created_at',
                 models.DateTimeField(auto_now_add=True,
                                      db_index=True,
                                      verbose_name='created at')),
                ('focal_point_x',
                 models.PositiveIntegerField(blank=True, null=True)),
                ('focal_point_y',
                 models.PositiveIntegerField(blank=True, null=True)),
                ('focal_point_width',
                 models.PositiveIntegerField(blank=True, null=True)),
                ('focal_point_height',
                 models.PositiveIntegerField(blank=True, null=True)),
                ('file_size',
                 models.PositiveIntegerField(editable=False, null=True)),
                ('author',
                 models.CharField(blank=True,
                                  max_length=56,
                                  null=True,
                                  verbose_name='auteur')),
                ('collection',
                 models.ForeignKey(
                     default=wagtail.wagtailcore.models.get_root_collection_id,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='+',
                     to='wagtailcore.Collection',
                     verbose_name='collection')),
                ('tags',
                 taggit.managers.TaggableManager(blank=True,
                                                 help_text=None,
                                                 through='taggit.TaggedItem',
                                                 to='taggit.Tag',
                                                 verbose_name='tags')),
                ('uploaded_by_user',
                 models.ForeignKey(
                     blank=True,
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='uploaded by user')),
            ],
            options={
                'abstract': False,
            },
            bases=(models.Model, wagtail.wagtailadmin.taggable.TagSearchable),
        ),
        migrations.CreateModel(
            name='CustomRendition',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file',
                 models.ImageField(height_field='height',
                                   upload_to='images',
                                   width_field='width')),
                ('width', models.IntegerField(editable=False)),
                ('height', models.IntegerField(editable=False)),
                ('focal_point_key',
                 models.CharField(blank=True,
                                  default='',
                                  editable=False,
                                  max_length=255)),
                ('filter',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='+',
                                   to='wagtailimages.Filter')),
                ('image',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='renditions',
                                   to='home.CustomImage')),
            ],
        ),
        migrations.CreateModel(
            name='FestivalImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_primary',
                 models.BooleanField(default=False,
                                     verbose_name='hoofdafbeelding')),
                ('image',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='+',
                                   to='home.CustomImage',
                                   verbose_name='afbeelding')),
            ],
        ),
        migrations.CreateModel(
            name='FestivalIndexPage',
            fields=[
                ('page_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='wagtailcore.Page')),
            ],
            options={
                'abstract': False,
            },
            bases=('wagtailcore.page', ),
        ),
        migrations.CreateModel(
            name='FestivalLocation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='FestivalPage',
            fields=[
                ('page_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='wagtailcore.Page')),
                ('name',
                 models.CharField(default='',
                                  max_length=40,
                                  unique=True,
                                  verbose_name='Festival naam')),
                ('description',
                 wagtail.wagtailcore.fields.RichTextField(
                     blank=True,
                     default='',
                     verbose_name='Festival promo tekst')),
                ('date',
                 models.DateField(null=True, verbose_name='Festival datum')),
                ('duration',
                 models.PositiveIntegerField(default=1,
                                             verbose_name='Duur (# dagen)')),
                ('website',
                 models.URLField(blank=True, max_length=120, null=True)),
            ],
            options={
                'verbose_name': 'Festival',
                'ordering': ['-date'],
            },
            bases=('wagtailcore.page', ),
        ),
        migrations.CreateModel(
            name='FestivalPageRateableAttribute',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=27)),
            ],
            options={
                'verbose_name_plural': 'Beoordeelbare kenmerken',
                'verbose_name': 'Beoordeelbaar kenmerk',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='FestivalPageRatebleAttributeValue',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('page',
                 modelcluster.fields.ParentalKey(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='rateable_attributes',
                     to='home.FestivalPage')),
                ('rateable_attribute',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='+',
                                   to='home.FestivalPageRateableAttribute',
                                   unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='FestivalPageTag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content_object',
                 modelcluster.fields.ParentalKey(
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='tagged_items',
                     to='home.FestivalPage')),
                ('tag',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='home_festivalpagetag_items',
                                   to='taggit.Tag')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='HomePage',
            fields=[
                ('page_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='wagtailcore.Page')),
                ('body',
                 wagtail.wagtailcore.fields.StreamField(
                     (('carousel',
                       wagtail.wagtailcore.blocks.
                       ListBlock(wagtail.wagtailcore.blocks.StructBlock(
                           (('image',
                             wagtail.wagtailimages.blocks.ImageChooserBlock()),
                            ('caption',
                             wagtail.wagtailcore.blocks.TextBlock(
                                 required=False)))),
                                 icon='image',
                                 template='home/blocks/carousel.html')), ),
                     null=True)),
                ('test',
                 wagtail.wagtailcore.fields.RichTextField(blank=True,
                                                          null=True)),
            ],
            options={
                'verbose_name': 'Startpagina',
            },
            bases=('wagtailcore.page', ),
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=28, verbose_name='locatie naam')),
                ('longitude',
                 models.DecimalField(blank=True,
                                     decimal_places=7,
                                     max_digits=10,
                                     null=True)),
                ('latitude',
                 models.DecimalField(blank=True,
                                     decimal_places=7,
                                     max_digits=10,
                                     null=True)),
            ],
            options={
                'verbose_name_plural': 'locaties',
                'verbose_name': 'locatie',
            },
        ),
        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=28,
                                  unique=True,
                                  verbose_name='naam')),
                ('last_name',
                 models.CharField(blank=True,
                                  max_length=64,
                                  verbose_name='familienaam')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   null=True,
                                   verbose_name='email adres')),
                ('phone',
                 models.CharField(blank=True,
                                  max_length=28,
                                  null=True,
                                  verbose_name='telefoon nr')),
            ],
            options={
                'verbose_name_plural': 'personen',
                'verbose_name': 'persoon',
                'ordering': ['first_name'],
            },
        ),
        #        migrations.CreateModel(
        #            name='AddressOrderable',
        #            fields=[
        #                ('address_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='home.Address')),
        #                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
        #            ],
        #            options={
        #                'abstract': False,
        #                'ordering': ['sort_order'],
        #            },
        #            bases=('home.address', models.Model),
        #        ),
        #        migrations.CreateModel(
        #            name='OrderableTest',
        #            fields=[
        #                ('location_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='home.Location')),
        #                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
        #            ],
        #            options={
        #                'abstract': False,
        #                'ordering': ['sort_order'],
        #            },
        #            bases=('home.location', models.Model),
        #        ),
        migrations.AddField(
            model_name='location',
            name='address',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='location',
                to='home.Address',
                verbose_name='adres'),
        ),
        migrations.AddField(
            model_name='festivalpage',
            name='contact_person',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='festivals',
                to='home.Person'),
        ),
        migrations.AddField(
            model_name='festivalpage',
            name='location',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='festivals',
                to='home.Location'),
        ),
        migrations.AddField(
            model_name='festivalpage',
            name='main_image',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='+',
                to='wagtailimages.Image'),
        ),
        migrations.AddField(
            model_name='festivalpage',
            name='tags',
            field=modelcluster.contrib.taggit.ClusterTaggableManager(
                blank=True,
                help_text='A comma-separated list of tags.',
                through='home.FestivalPageTag',
                to='taggit.Tag',
                verbose_name='Tags'),
        ),
        migrations.AddField(
            model_name='festivallocation',
            name='location',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='home.Location'),
        ),
        migrations.AddField(
            model_name='festivallocation',
            name='page',
            field=modelcluster.fields.ParentalKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='locations',
                to='home.FestivalPage'),
        ),
        migrations.AddField(
            model_name='festivalimage',
            name='page',
            field=modelcluster.fields.ParentalKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name='images',
                to='home.FestivalPage'),
        ),
        #        migrations.AddField(
        #            model_name='orderabletest',
        #            name='page',
        #            field=modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='locaties', to='home.FestivalPage'),
        #        ),
        migrations.AlterUniqueTogether(
            name='customrendition',
            unique_together=set([('image', 'filter', 'focal_point_key')]),
        ),
        #        migrations.AddField(
        #            model_name='addressorderable',
        #            name='page',
        #            field=modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='adresorderable', to='home.FestivalPage'),
        #        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='CMD',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('cmd',
                 models.TextField(verbose_name='\u547d\u4ee4\u5185\u5bb9')),
                ('ctype',
                 models.SmallIntegerField(
                     blank=True,
                     choices=[(1, 'GREP\u65e5\u5fd7'),
                              (2, '\u5e38\u7528\u811a\u672c'),
                              (4, 'APP\u914d\u7f6e\u8f83\u9a8c'),
                              (6, '\u81ea\u5b9a\u4e49\u547d\u4ee4')],
                     default=1,
                     null=True,
                     verbose_name='\u547d\u4ee4\u7c7b\u578b')),
                ('text',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='\u5907\u6ce8')),
                ('createtime',
                 models.DateTimeField(
                     auto_now_add=True,
                     null=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('end',
                 models.BooleanField(default=False,
                                     verbose_name='\u4efb\u52a1\u5b8c\u6210')),
            ],
            options={
                'verbose_name': 'CMD\u8bb0\u5f55',
            },
        ),
        migrations.CreateModel(
            name='CMD_Log',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('createtime',
                 models.DateTimeField(
                     auto_now_add=True,
                     null=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('text',
                 models.TextField(blank=True,
                                  default='',
                                  null=True,
                                  verbose_name='\u8fd4\u56de\u4fe1\u606f')),
                ('cmd',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='cmdb.CMD',
                                   verbose_name='\u547d\u4ee4')),
            ],
            options={
                'verbose_name': 'CMD\u7ed3\u679c',
            },
        ),
        migrations.CreateModel(
            name='Host',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(
                     default='',
                     help_text=
                     '\u7528\u4e8e\u4eba\u5de5\u8fa8\u522b\uff0c\u81ea\u52a8\u811a\u672c\u9ed8\u8ba4\u8bbe\u7f6e\u4e3a\u4e3b\u673a\u540d\uff0c\u53ef\u6539\u4e3a\u5176\u5b83\u4fbf\u4e8e\u4eba\u5458\u8bc6\u522b\u7684\u540d\u79f0',
                     max_length=100,
                     verbose_name='\u6807\u8bc6\u540d\u79f0')),
                ('hostname',
                 models.CharField(
                     help_text=
                     '\u5173\u952e\u5b57\u6bb5\uff0c\u8bf7\u8c28\u614e\u4fee\u6539',
                     max_length=50,
                     unique=True,
                     verbose_name='\u4e3b\u673a\u540d/\u8ba1\u7b97\u673a\u540d'
                 )),
                ('ip',
                 models.GenericIPAddressField(
                     help_text=
                     '\u82e5\u6709\u591a\u4e2aIP\u4e14\u4e3b\u673a\u540d\u65e0\u6307\u5b9a\u89e3\u6790\u5219\u9ed8\u8ba4\u4e3a0.0.0.0\uff0c\u8bf7\u5728\u5ba2\u6237\u7aef/etc/hosts\u4e2d\u8bbe\u7f6e\u5176\u4e3b\u673a\u540d\u5bf9\u5e94IP\u89e3\u6790',
                     verbose_name='\u7ba1\u7406IP')),
                ('port',
                 models.IntegerField(blank=True,
                                     default=22,
                                     null=True,
                                     verbose_name='ssh\u7aef\u53e3')),
                ('other_ip',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='\u5176\u5b83IP')),
                ('status',
                 models.SmallIntegerField(
                     blank=True,
                     choices=[(1, '\u5728\u7528'), (2, '\u5907\u7528'),
                              (3, '\u6545\u969c'),
                              (4, '\u4e0b\u7ebf'),
                              (6, '\u5176\u5b83')],
                     default=1,
                     null=True,
                     verbose_name='\u8bbe\u5907\u72b6\u6001')),
                ('asset_type',
                 models.SmallIntegerField(
                     blank=True,
                     choices=[(1, '\u7269\u7406\u673a'),
                              (2, '\u865a\u62df\u673a'), (3, '\u5bb9\u5668'),
                              (4, 'H3C\u4ea4\u6362\u673a'),
                              (6, '\u5176\u5b83')],
                     default=1,
                     null=True,
                     verbose_name='\u8bbe\u5907\u7c7b\u578b')),
                ('os',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=100,
                                  null=True,
                                  verbose_name='\u64cd\u4f5c\u7cfb\u7edf')),
                ('cpu_model',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=100,
                                  null=True,
                                  verbose_name='CPU\u578b\u53f7')),
                ('cpu_num',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text=
                     '\u7269\u7406\u6838\u4e2a\u6570, \u903b\u8f91\u6838\u4e2a\u6570\uff0c(intel\u9ad8\u7aefCPU\u5e26\u8d85\u7ebf\u7a0b\u6280\u672f)',
                     max_length=100,
                     null=True,
                     verbose_name='CPU\u6570\u91cf')),
                ('memory',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=30,
                                  null=True,
                                  verbose_name='\u5185\u5b58\u5927\u5c0f')),
                ('disk',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=255,
                                  null=True,
                                  verbose_name='\u786c\u76d8\u4fe1\u606f')),
                ('vendor',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=150,
                                  null=True,
                                  verbose_name='\u4f9b\u5e94\u5546')),
                ('sn',
                 models.CharField(
                     blank=True,
                     default='',
                     max_length=150,
                     null=True,
                     verbose_name='\u4e3b\u673a\u5e8f\u5217\u53f7')),
                ('ports',
                 models.TextField(
                     blank=True,
                     default='',
                     help_text=
                     '\u4e3b\u673a\u4e0a\u5904\u4e8e\u76d1\u542c\u72b6\u6001\u7684TCP\u548cUDP\u7aef\u53e3',
                     null=True,
                     verbose_name='\u76d1\u542c\u7aef\u53e3')),
                ('createtime',
                 models.DateTimeField(
                     auto_now_add=True,
                     null=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('changetime',
                 models.DateTimeField(
                     auto_now=True,
                     null=True,
                     verbose_name='\u4fee\u6539\u65f6\u95f4')),
                ('agenttime',
                 models.DateTimeField(
                     blank=True,
                     help_text=
                     '\u6700\u8fd1\u4e00\u6b21\u4e3b\u673a\u5ba2\u6237\u7aef\u81ea\u52a8\u811a\u672c\u8fd0\u884c\u66f4\u65b0\u8f6f\u786c\u4ef6\u4fe1\u606f\u7684\u65f6\u95f4',
                     null=True,
                     verbose_name='\u914d\u7f6e\u66f4\u65b0')),
                ('buydate',
                 models.DateField(blank=True,
                                  default=datetime.datetime.today,
                                  null=True,
                                  verbose_name='\u8d2d\u4e70\u65e5\u671f')),
                ('position',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=250,
                                  null=True,
                                  verbose_name='\u6240\u5904\u4f4d\u7f6e')),
                ('sernumb',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=150,
                                  null=True,
                                  verbose_name='\u670d\u52a1\u7f16\u53f7')),
                ('sercode',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=150,
                                  null=True,
                                  verbose_name='\u670d\u52a1\u4ee3\u7801')),
                ('tomcat',
                 models.CharField(default='/data/app/tomcat',
                                  max_length=100,
                                  verbose_name='Tomcat\u76ee\u5f55')),
                ('tomcat_ver',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=50,
                                  verbose_name='Tomcat\u7248\u672c')),
                ('jdk_ver',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=50,
                                  verbose_name='JDK\u7248\u672c')),
                ('kernel',
                 models.CharField(
                     blank=True,
                     default='',
                     max_length=60,
                     verbose_name='\u7cfb\u7edf\u5185\u6838\u7248\u672c')),
                ('text',
                 models.TextField(blank=True,
                                  default='',
                                  null=True,
                                  verbose_name='\u5907\u6ce8\u4fe1\u606f')),
                ('admin',
                 models.ForeignKey(
                     blank=True,
                     help_text=
                     '\u8d1f\u8d23\u4eba\u76f4\u63a5\u6709(\u5f53\u524d\u4e3b\u673a/\u540d\u4e0b\u4e3b\u673a)\u64cd\u4f5c\u6743\u9650',
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='user_set2',
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='\u7ba1\u7406\u4eba')),
            ],
            options={
                'ordering': ['group', 'ip'],
                'verbose_name':
                '\u4e3b\u673a',
                'permissions':
                (('deploy_host', 'Can deploy host'), ('webssh_host',
                                                      'Can webssh host'),
                 ('grep_host', 'Can grep host'), ('run_sh_host',
                                                  'Can run_sh host'),
                 ('run_cmd_host', 'Can run_cmd host'), ('other_do_host',
                                                        'Can other_do host')),
            },
        ),
        migrations.CreateModel(
            name='HostGroup',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=30,
                                  unique=True,
                                  verbose_name='\u7ec4\u540d/\u533a\u57df')),
                ('ip',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text=
                     'IP\u5f00\u5934\u5b57\u7b26\uff0c\u6bd4\u5982Core\u7ec4IP\u4e3a10.2.4.\u5f00\u5934\u3002\u7528\u4e8e\u5ba2\u6237\u7aef\u811a\u672c\u6dfb\u52a0\u65b0\u4e3b\u673a\u65f6\u81ea\u52a8\u8bbe\u7f6e\u7ec4\uff0c\u4e0d\u652f\u6301\u901a\u914d\u7b26',
                     max_length=20,
                     verbose_name='IP\u5339\u914d')),
                ('desc',
                 models.CharField(blank=True,
                                  max_length=100,
                                  null=True,
                                  verbose_name='\u63cf\u8ff0')),
            ],
            options={
                'ordering': ['name'],
                'verbose_name': '\u4e3b\u673a\u5206\u7ec4',
            },
        ),
        migrations.CreateModel(
            name='SH',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='\u6807\u8bc6\u540d')),
                ('fname',
                 models.CharField(
                     default='',
                     help_text=
                     '\u4f7f\u811a\u672c\u80fd\u901a\u8fc7URL\u5f62\u5f0f\u6765\u8c03\u7528\uff0chttp://10.2.21.34:8088/api/sh/\u6587\u4ef6\u540d\uff0c\u5e76\u4e14\u901a\u8fc7\u540e\u7f00\u540d\u533a\u5206py\u3001sh\u811a\u672c',
                     max_length=100,
                     verbose_name='\u6587\u4ef6\u540d')),
                ('sh',
                 models.SmallIntegerField(
                     blank=True,
                     choices=[(1, '\u9ed8\u8ba4'),
                              (2, 'H3C\u4ea4\u6362\u673a'),
                              (3, 'APP\u914d\u7f6e')],
                     default=1,
                     null=True,
                     verbose_name='\u811a\u672c\u7c7b\u578b')),
                ('cmd',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='\u811a\u672c\u5185\u5bb9')),
                ('text',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='\u5907\u6ce8')),
                ('createtime',
                 models.DateTimeField(
                     auto_now_add=True,
                     null=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
            ],
            options={
                'ordering': ['sh', 'fname'],
                'verbose_name': '\u5e38\u7528\u547d\u4ee4/\u811a\u672c',
            },
        ),
        migrations.CreateModel(
            name='SshUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(
                     default='',
                     help_text=
                     '\u6807\u8bc6\u540d\u79f0\uff0c\u5f53\u4e0d\u540c\u670d\u52a1\u5668\u4f7f\u7528\u76f8\u540c\u7684SSH\u8d26\u53f7\u540d\uff0c\u4f46\u5bc6\u7801\u4e0d\u540c\u65f6\uff0c\u6b64\u9879\u540d\u79f0\u53ef\u8fdb\u884c\u533a\u5206\u3002',
                     max_length=50,
                     verbose_name='\u540d\u79f0')),
                ('username',
                 models.CharField(default='',
                                  max_length=50,
                                  verbose_name='SSH\u8d26\u53f7')),
                ('password',
                 models.CharField(
                     blank=True,
                     default='',
                     help_text=
                     '\u82e5\u4e0d\u60f3\u4fee\u6539\u539f\u5bc6\u7801\uff0c\u4e0d\u7528\u8bbe\u7f6e\u6b64\u9879',
                     max_length=50,
                     null=True,
                     verbose_name='\u5bc6\u7801')),
                ('changetime',
                 models.DateTimeField(
                     auto_now=True,
                     null=True,
                     verbose_name='\u6700\u540e\u4fee\u6539')),
                ('text',
                 models.TextField(blank=True,
                                  default='',
                                  null=True,
                                  verbose_name='\u5907\u6ce8\u4fe1\u606f')),
            ],
            options={
                'ordering': ['name'],
                'verbose_name': '\u4e3b\u673aSSH\u7528\u6237',
            },
        ),
        migrations.AlterUniqueTogether(
            name='sshuser',
            unique_together=set([('name', 'username')]),
        ),
        migrations.AlterUniqueTogether(
            name='sh',
            unique_together=set([('sh', 'fname')]),
        ),
        migrations.AddField(
            model_name='host',
            name='group',
            field=models.ForeignKey(
                blank=True,
                default=1,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='cmdb.HostGroup',
                verbose_name='\u7ec4/\u5b89\u5168\u533a\u57df'),
        ),
        migrations.AddField(
            model_name='host',
            name='machine',
            field=models.ForeignKey(
                blank=True,
                help_text=
                '\u8bbe\u5907\u7c7b\u578b\u4e3a\u865a\u62df\u673a/\u5bb9\u5668\u65f6\uff0c\u8bbe\u7f6e\u6240\u5728\u7269\u7406\u673a',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='cmdb.Host',
                verbose_name='\u6240\u5c5e\u7269\u7406\u673a'),
        ),
        migrations.AddField(
            model_name='host',
            name='ssh_user',
            field=models.ForeignKey(
                blank=True,
                help_text=
                '\u5f53\u524d\u4e3b\u673a\u7684SSH\u7528\u6237\uff0c\u7528\u4e8essh\u8fde\u63a5\u6267\u884c\u547d\u4ee4\u6216\u7ec8\u7aefWEB SSH',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='cmdb.SshUser',
                verbose_name='SSH\u7ec8\u7aef\u7528\u6237'),
        ),
        migrations.AddField(
            model_name='host',
            name='user',
            field=models.ManyToManyField(
                blank=True,
                help_text=
                '\u7f51\u7ad9\u54ea\u4e9b\u7528\u6237\u80fd\u5bf9\u5f53\u524d\u4e3b\u673a\u8fdb\u884c\u64cd\u4f5c\uff0c\u8d85\u7ea7\u7528\u6237\u76f4\u63a5\u6709\u64cd\u4f5c\u6743\u9650',
                to=settings.AUTH_USER_MODEL,
                verbose_name='\u7f51\u7ad9\u7528\u6237\u6743\u9650'),
        ),
        migrations.AddField(
            model_name='host',
            name='usergroup',
            field=models.ManyToManyField(
                blank=True,
                help_text=
                '\u7f51\u7ad9\u54ea\u4e9b\u7528\u6237\u7ec4\u80fd\u5bf9\u5f53\u524d\u4e3b\u673a\u8fdb\u884c\u64cd\u4f5c',
                to='auth.Group',
                verbose_name='\u7f51\u7ad9\u7528\u6237\u7ec4'),
        ),
        migrations.AddField(
            model_name='cmd_log',
            name='host',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='cmdb.Host',
                verbose_name='\u4e3b\u673a'),
        ),
        migrations.AddField(
            model_name='cmd',
            name='host',
            field=models.ManyToManyField(
                blank=True,
                to='cmdb.Host',
                verbose_name='\u6267\u884c\u4e3b\u673a'),
        ),
        migrations.AddField(
            model_name='cmd',
            name='user',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='\u64cd\u4f5c\u4eba'),
        ),
    ]
Exemplo n.º 10
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Campaign',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
                ('active_status', models.BooleanField(default=True)),
                ('script', models.TextField(blank=True)),
                ('text', models.TextField(blank=True)),
                ('start_date', models.DateField(blank=True)),
                ('end_date', models.DateField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='DNC',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(blank=True)),
                ('on', models.DateField(auto_now_add=True)),
                ('campaign', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.Campaign')),
            ],
        ),
        migrations.CreateModel(
            name='Executive',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('details', models.TextField(blank=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Lead',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField(blank=True)),
                ('on', models.DateField(auto_now_add=True)),
                ('campaign', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.Campaign')),
                ('executive', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.Executive')),
            ],
        ),
        migrations.CreateModel(
            name='Prospect',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=32)),
                ('last_name', models.CharField(max_length=32)),
                ('phone', models.CharField(blank=True, max_length=15)),
                ('direct_or_extension', models.CharField(blank=True, max_length=16)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('company', models.CharField(blank=True, max_length=128)),
                ('emp_size', models.CharField(blank=True, max_length=16)),
                ('website', models.CharField(blank=True, max_length=64)),
                ('job_title', models.CharField(blank=True, max_length=64)),
                ('industry_type', models.CharField(blank=True, max_length=64)),
                ('city', models.CharField(blank=True, max_length=32)),
                ('state', models.CharField(blank=True, max_length=32)),
                ('country', models.CharField(blank=True, max_length=32)),
                ('zip_code', models.IntegerField(blank=True)),
                ('assigned_campaign', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='portal.Campaign')),
            ],
        ),
        migrations.AddField(
            model_name='lead',
            name='prospect',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.Prospect'),
        ),
        migrations.AddField(
            model_name='dnc',
            name='executive',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.Executive'),
        ),
        migrations.AddField(
            model_name='dnc',
            name='prospect',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='portal.Prospect'),
        ),
        migrations.AddField(
            model_name='campaign',
            name='executives',
            field=models.ManyToManyField(to='portal.Executive'),
        ),
        migrations.AlterUniqueTogether(
            name='lead',
            unique_together={('campaign', 'prospect')},
        ),
        migrations.AlterUniqueTogether(
            name='dnc',
            unique_together={('campaign', 'prospect')},
        ),
    ]
Exemplo n.º 11
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Dataset',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField()),
                ('source', models.TextField()),
                ('description', models.TextField()),
                ('order', models.IntegerField(default=999)),
                ('references', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(), null=True, size=None)),
                ('stored_at', models.CharField(choices=[('LOCAL_POSTGRES', 'Local PostgreSQL instance'), ('UBITECH_POSTGRES', "UBITECH's PostgreSQL instance at http://212.101.173.21"), ('UBITECH_PRESTO', "UBITECH's PRESTO instance"), ('UBITECH_SOLR', 'Solr instance at http://212.101.173.50:8983')], default='LOCAL_POSTGRES', max_length=32)),
                ('table_name', models.CharField(max_length=200)),
                ('private', models.BooleanField(default=False)),
                ('spatialEast', models.CharField(max_length=200, null=True)),
                ('spatialSouth', models.CharField(max_length=200, null=True)),
                ('spatialNorth', models.CharField(max_length=200, null=True)),
                ('spatialWest', models.CharField(max_length=200, null=True)),
                ('temporalCoverageBegin', models.DateTimeField(null=True)),
                ('temporalCoverageEnd', models.DateTimeField(null=True)),
                ('license', models.CharField(max_length=200, null=True)),
                ('observations', models.CharField(max_length=200, null=True)),
                ('publisher', models.TextField()),
                ('category', models.CharField(max_length=200, null=True)),
                ('image_uri', models.TextField(default='/static/img/logo.png')),
                ('sample_rows', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
                ('number_of_rows', models.CharField(max_length=200, null=True)),
                ('size_in_gb', models.FloatField(null=True)),
                ('update_frequency', models.CharField(default='-', max_length=200)),
                ('last_updated', models.DateTimeField(null=True)),
                ('metadata', django.contrib.postgres.fields.jsonb.JSONField(default={})),
                ('hascoverage_img', models.BooleanField(default=False)),
                ('arguments', django.contrib.postgres.fields.jsonb.JSONField(default={})),
            ],
            options={
                'ordering': ['-id'],
            },
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField()),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Vessel_Identifier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('column_name', models.CharField(max_length=200)),
                ('values_list', django.contrib.postgres.fields.jsonb.JSONField()),
                ('dataset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vessel_identifiers', to='aggregator.Dataset')),
            ],
        ),
        migrations.CreateModel(
            name='Variable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('title', models.CharField(max_length=256)),
                ('unit', models.CharField(max_length=256)),
                ('description', models.TextField(null=True)),
                ('sameAs', models.CharField(max_length=256, null=True)),
                ('dataType', models.CharField(max_length=256, null=True)),
                ('original_column_name', models.CharField(max_length=256, null=True)),
                ('scale_factor', models.FloatField(default=1)),
                ('add_offset', models.FloatField(default=0)),
                ('cell_methods', django.contrib.postgres.fields.ArrayField(base_field=models.TextField(), null=True, size=None)),
                ('type_of_analysis', models.TextField(blank=True, default=None, null=True)),
                ('distribution', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), blank=True, default=None, null=True, size=7)),
                ('dataset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='variables', to='aggregator.Dataset')),
            ],
            options={
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='JoinOfDatasets',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('view_name', models.CharField(max_length=100)),
                ('dataset_first', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='first', to='aggregator.Dataset')),
                ('dataset_second', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='second', to='aggregator.Dataset')),
            ],
        ),
        migrations.CreateModel(
            name='Dimension',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('title', models.CharField(max_length=256)),
                ('unit', models.CharField(max_length=256)),
                ('description', models.TextField(null=True)),
                ('sameAs', models.CharField(max_length=256, null=True)),
                ('dataType', models.CharField(max_length=256, null=True)),
                ('original_column_name', models.CharField(max_length=256, null=True)),
                ('min', models.DecimalField(blank=True, decimal_places=50, default=None, max_digits=100, null=True)),
                ('max', models.DecimalField(blank=True, decimal_places=50, default=None, max_digits=100, null=True)),
                ('step', models.DecimalField(blank=True, decimal_places=50, default=None, max_digits=100, null=True)),
                ('axis', models.TextField(blank=True, default=None, null=True)),
                ('non_filterable', models.BooleanField(default=False)),
                ('variable', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dimensions', to='aggregator.Variable')),
            ],
            options={
                'ordering': ['pk'],
            },
        ),
        migrations.CreateModel(
            name='DatasetAccessRequest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('open', 'open'), ('accepted', 'accepted'), ('rejected', 'rejected')], default='open', max_length=20)),
                ('creation_date', models.DateTimeField(default=datetime.datetime(2020, 2, 17, 14, 50, 48, 724320))),
                ('response_date', models.DateTimeField(null=True)),
                ('resource', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='resource', to='aggregator.Dataset')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='DatasetAccess',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('start', models.DateField()),
                ('end', models.DateField()),
                ('valid', models.BooleanField()),
                ('dataset', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='aggregator.Dataset')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='dataset',
            name='access_list',
            field=models.ManyToManyField(through='aggregator.DatasetAccess', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='dataset',
            name='joined_with_dataset',
            field=models.ManyToManyField(related_name='joined_to', through='aggregator.JoinOfDatasets', to='aggregator.Dataset'),
        ),
        migrations.AddField(
            model_name='dataset',
            name='organization',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='datasets', to='aggregator.Organization'),
        ),
        migrations.AddField(
            model_name='dataset',
            name='owner',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='dataset_owner', to=settings.AUTH_USER_MODEL),
        ),
    ]
Exemplo n.º 12
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('atm', '0010_auto_20161206_1038'),
    ]

    operations = [
        migrations.CreateModel(
            name='CodeModel',
            fields=[
                ('id',
                 models.AutoField(verbose_name='ID',
                                  serialize=False,
                                  auto_created=True,
                                  primary_key=True)),
                ('code_name',
                 models.CharField(max_length=200,
                                  null=True,
                                  verbose_name='\u6a21\u677f\u540d\u79f0',
                                  blank=True)),
                ('description',
                 models.TextField(null=True,
                                  verbose_name='\u6a21\u677f\u63cf\u8ff0',
                                  blank=True)),
                ('is_active',
                 models.BooleanField(default=True,
                                     verbose_name='\u662f\u5426\u542f\u7528')),
                ('is_deleted',
                 models.BooleanField(
                     default=False,
                     verbose_name='\u662f\u5426\u5df2\u5220\u9664')),
                ('ctime',
                 models.DateTimeField(
                     auto_now_add=True,
                     verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('utime',
                 models.DateTimeField(
                     auto_now=True, verbose_name='\u66f4\u65b0\u65f6\u95f4')),
                ('author',
                 models.ForeignKey(related_name='codemodel_author',
                                   verbose_name='\u521b\u5efa\u4eba',
                                   blank=True,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True)),
                ('modifier',
                 models.ForeignKey(related_name='codemodel_modifier',
                                   verbose_name='\u4fee\u6539\u4eba',
                                   blank=True,
                                   to=settings.AUTH_USER_MODEL,
                                   null=True)),
                ('parent',
                 models.ForeignKey(related_name='codemodel_parent',
                                   verbose_name='\u7236\u6a21\u677f',
                                   blank=True,
                                   to='atm.CodeModel',
                                   null=True)),
            ],
            options={
                'db_table': 'codemodel',
                'verbose_name': '\u4ee3\u7801\u6a21\u677f',
                'verbose_name_plural': '\u4ee3\u7801\u6a21\u677f',
            },
        ),
    ]
Exemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Articulo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('marca', models.CharField(max_length=50)),
                ('imagen_presentacion', models.ImageField(null=True, upload_to='media')),
                ('descripcion', models.TextField(max_length=500)),
                ('precio', models.FloatField(default=0.0)),
                ('descuento', models.FloatField(default=0.0)),
            ],
        ),
        migrations.CreateModel(
            name='ArticuloPedido',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ordenado', models.BooleanField(default=False)),
                ('cantidad', models.IntegerField(default=1)),
                ('articulo', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Articulo')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Categorias',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre', models.CharField(default='Sin categoria', max_length=100)),
                ('descripcion', models.CharField(default='Sin descripcion', max_length=100)),
                ('color_descriptivo', models.CharField(default='black', max_length=9)),
            ],
        ),
        migrations.CreateModel(
            name='Direccion',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nombre_referencia', models.CharField(max_length=100)),
                ('telefono', phonenumber_field.modelfields.PhoneNumberField(blank=True, help_text='Numero de contacto', max_length=128, region=None)),
                ('direccion_especifica', models.CharField(max_length=50)),
                ('pais', django_countries.fields.CountryField(max_length=2)),
                ('provincia', models.CharField(max_length=50)),
                ('cuidad', models.CharField(max_length=50)),
                ('codigo_postal', models.IntegerField()),
                ('default', models.BooleanField(default=False)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ImagenRefencia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('imagen', models.ImageField(upload_to='media')),
                ('descripcion', models.TextField(blank=True, max_length=50, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Pago',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stripe_charger_id', models.CharField(max_length=50)),
                ('total_pago', models.FloatField()),
                ('timestap', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Slider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='media')),
                ('texto', models.TextField(max_length=500)),
                ('texto_pequeño', models.TextField(max_length=500)),
                ('posicion', models.CharField(choices=[('C', 'Centro'), ('D', 'Derecha')], max_length=1)),
            ],
        ),
        migrations.CreateModel(
            name='Pedido',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fecha_inicio', models.DateTimeField(auto_now=True)),
                ('fecha_pedido', models.DateTimeField()),
                ('ordenado', models.BooleanField(default=False)),
                ('entregado', models.BooleanField(default=False)),
                ('articulos_pedidos', models.ManyToManyField(to='core.ArticuloPedido')),
                ('direccion_envio', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Direccion')),
                ('pago', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.Pago')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='articulo',
            name='categoria',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Categorias'),
        ),
        migrations.AddField(
            model_name='articulo',
            name='imagen_referencia',
            field=models.ManyToManyField(to='core.ImagenRefencia'),
        ),
    ]
Exemplo n.º 14
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('backend_candidate', '0014_remove_suggesting_models'),
        ('merepresenta', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='VolunteerGetsCandidateEmailLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now=True)),
                ('updated', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='VolunteerInCandidate',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now=True)),
                ('updated', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Candidate',
            fields=[
            ],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('elections.candidate',),
        ),
        migrations.AddField(
            model_name='volunteerincandidate',
            name='candidate',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merepresenta.Candidate'),
        ),
        migrations.AddField(
            model_name='volunteerincandidate',
            name='volunteer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='volunteergetscandidateemaillog',
            name='candidate',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='merepresenta.Candidate'),
        ),
        migrations.AddField(
            model_name='volunteergetscandidateemaillog',
            name='contact',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend_candidate.CandidacyContact'),
        ),
        migrations.AddField(
            model_name='volunteergetscandidateemaillog',
            name='volunteer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
def make_dependencies():
    import django_comments

    if is_abstract():
        dependencies.append(migrations.swappable_dependency(django_comments.get_model_name()))
    return dependencies
Exemplo n.º 16
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='RepaymentAccount',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('applied', models.BooleanField(default=False)),
                ('repaid', models.BooleanField(default=False)),
                ('monthly_repaid', models.BooleanField(default=False)),
                ('lateness', models.BooleanField(default=False)),
                ('loan_owed',
                 models.DecimalField(decimal_places=3,
                                     max_digits=15,
                                     null=True)),
                ('paid_amount',
                 models.DecimalField(decimal_places=3,
                                     default=0,
                                     max_digits=15)),
                ('per_monthly_payment',
                 models.DecimalField(decimal_places=3,
                                     max_digits=15,
                                     null=True)),
                ('lateness_fee',
                 models.DecimalField(decimal_places=3,
                                     max_digits=15,
                                     null=True)),
                ('max_loan_tenure',
                 models.PositiveSmallIntegerField(null=True)),
                ('user_loan_tenure',
                 models.PositiveSmallIntegerField(null=True)),
                ('next_payment_date', models.DateField(null=True)),
                ('lateness_date', models.DateField(null=True)),
                ('repayment_date', models.DateField(null=True)),
                ('loan_interest', models.IntegerField(null=True)),
                ('loan_disbursed', models.BooleanField(default=False)),
                ('user_loan',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='loans.LoanAccount')),
            ],
        ),
        migrations.CreateModel(
            name='PayStackDetails',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('auth_code', models.CharField(max_length=50, null=True)),
                ('signature_code', models.CharField(max_length=50, null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 17
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='IndividualUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text="user's full name",
                                  max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('contact', models.CharField(max_length=11)),
                ('created_at', models.DateTimeField()),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
                ('date_of_birth', models.DateField()),
                ('is_trainer', models.BooleanField(default=False)),
                ('auth',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OrganizationUser',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(help_text="user's full name",
                                  max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('contact', models.CharField(max_length=11)),
                ('created_at', models.DateTimeField()),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
                ('is_training_institute', models.BooleanField(default=False)),
                ('description', models.TextField(blank=True, null=True)),
                ('auth',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Exemplo n.º 18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Asistente',
            fields=[
                ('usuario',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='asistente',
                     serialize=False,
                     to=settings.AUTH_USER_MODEL,
                     verbose_name='Usuario')),
                ('telefono', models.CharField(max_length=8)),
            ],
        ),
        migrations.CreateModel(
            name='Carrera',
            fields=[
                ('codigo',
                 models.PositiveIntegerField(primary_key=True,
                                             serialize=False,
                                             unique=True)),
                ('nombre', models.CharField(max_length=128, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='Conferencista',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=64)),
                ('profesion', models.CharField(max_length=128)),
                ('resumen', models.CharField(default='', max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Salon',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=64, unique=True)),
                ('ubicacion', models.CharField(max_length=128)),
                ('capacidad', models.SmallIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Pago',
            fields=[
                ('titular',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.PROTECT,
                     primary_key=True,
                     related_name='pago',
                     serialize=False,
                     to='administracion.Asistente',
                     verbose_name='Asistente')),
                ('codigo_pago',
                 models.CharField(max_length=32,
                                  verbose_name='Código de recibo')),
                ('foto', models.TextField(verbose_name='Foto')),
                ('fecha_registro',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='Fecha de registro')),
                ('fecha', models.DateField(null=True, verbose_name='Fecha')),
                ('hora', models.TimeField(null=True, verbose_name='Hora')),
                ('estado',
                 models.SmallIntegerField(choices=[(1, 'Pendiente'),
                                                   (2, 'Rechazado'),
                                                   (3, 'Aceptado'),
                                                   (4, 'Reembolso solicitado'),
                                                   (5, 'Reembolso aprobado'),
                                                   (6, 'Reembolsado')],
                                          default=1,
                                          verbose_name='Estado')),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('asistente',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='ticket',
                     serialize=False,
                     to='administracion.Asistente',
                     verbose_name='Usuario')),
                ('codigo_qr', models.TextField()),
                ('estado',
                 models.PositiveSmallIntegerField(choices=[(1, 'VALIDO'),
                                                           (2, 'INVALIDADO')],
                                                  default=1,
                                                  verbose_name='Estados')),
            ],
        ),
        migrations.CreateModel(
            name='Cuenta',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('numero',
                 models.CharField(max_length=32,
                                  verbose_name='Número de cuenta')),
                ('banco', models.CharField(max_length=64,
                                           verbose_name='Banco')),
                ('titular',
                 models.CharField(max_length=128, verbose_name='Titular')),
            ],
            options={
                'unique_together': {('numero', 'banco')},
            },
        ),
        migrations.CreateModel(
            name='Conferencia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('tema', models.CharField(max_length=128, unique=True)),
                ('inicio', models.TimeField(verbose_name='Hora de inicio')),
                ('fin', models.TimeField(verbose_name='Hora de finalización')),
                ('foto',
                 models.ImageField(default='none', upload_to='conferencias')),
                ('conferencista',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='conferencias',
                                   to='administracion.Conferencista')),
                ('salon',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='conferencias',
                                   to='administracion.Salon')),
            ],
        ),
        migrations.CreateModel(
            name='ValidacionPago',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mensaje',
                 models.CharField(max_length=256,
                                  null=True,
                                  verbose_name='Mensaje')),
                ('resultado',
                 models.PositiveSmallIntegerField(choices=[(1, 'Rechazado'),
                                                           (2, 'Aceptado')],
                                                  default=2,
                                                  verbose_name='Resultado')),
                ('fecha_hora',
                 models.DateTimeField(
                     default=datetime.datetime.utcnow,
                     verbose_name='Fecha y hora de validación')),
                ('usuario',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='validaciones_pagos',
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Usuario que validó')),
                ('pago',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='validaciones',
                                   to='administracion.Pago',
                                   verbose_name='Pago')),
            ],
        ),
        migrations.CreateModel(
            name='Reservacion',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('fecha',
                 models.DateTimeField(verbose_name='Fecha de reservación')),
                ('estado',
                 models.SmallIntegerField(choices=[
                     (1, 'Confirmada'), (2, 'Pago pendiente de validar')
                 ],
                                          default=1,
                                          verbose_name='Estado')),
                ('asistente',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='reservaciones',
                                   to='administracion.Asistente',
                                   verbose_name='Asistente')),
                ('conferencia',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='reservaciones',
                                   to='administracion.Conferencia',
                                   verbose_name='Conferencia')),
            ],
            options={
                'unique_together': {('conferencia', 'asistente')},
            },
        ),
        migrations.AddField(
            model_name='pago',
            name='cuenta',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='pagos',
                to='administracion.Cuenta',
                verbose_name='Cuenta'),
        ),
        migrations.CreateModel(
            name='EvaluacionReembolso',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('mensaje',
                 models.CharField(max_length=256,
                                  null=True,
                                  verbose_name='Mensaje')),
                ('resultado',
                 models.PositiveSmallIntegerField(choices=[(1, 'Rechazado'),
                                                           (2, 'Aceptado'),
                                                           (3, 'Reembolsado')],
                                                  default=2,
                                                  verbose_name='Resultado')),
                ('fecha_hora',
                 models.DateTimeField(
                     default=datetime.datetime.utcnow,
                     verbose_name='Fecha y hora de evaluación')),
                ('usuario',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='evaluaciones_reembolsos',
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Usuario que evaluó')),
                ('pago',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='evaluaciones_reembolso',
                                   to='administracion.Pago',
                                   verbose_name='Pago')),
            ],
        ),
        migrations.CreateModel(
            name='EstudianteUmg',
            fields=[
                ('asistente',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     primary_key=True,
                     related_name='estudianteUmg',
                     serialize=False,
                     to='administracion.Asistente',
                     verbose_name='Asistente')),
                ('carnet', models.CharField(max_length=32, unique=True)),
                ('semestre',
                 models.PositiveSmallIntegerField(verbose_name='Semestre')),
                ('carrera',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='estudiantes',
                                   to='administracion.Carrera',
                                   verbose_name='Carrera')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='pago',
            unique_together={('cuenta', 'codigo_pago')},
        ),
        migrations.CreateModel(
            name='Asistencia',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('hora', models.TimeField(verbose_name='Hora de asistencia')),
                ('conferencia',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='asistencias',
                                   to='administracion.Conferencia',
                                   verbose_name='Conferencia')),
                ('ticket',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='asistencias',
                                   to='administracion.Ticket',
                                   verbose_name='Ticket')),
            ],
            options={
                'unique_together': {('conferencia', 'ticket')},
            },
        ),
    ]
Exemplo n.º 19
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Admin',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email',
                 models.EmailField(blank=True,
                                   max_length=254,
                                   null=True,
                                   verbose_name='邮件')),
                ('user_valid',
                 models.BooleanField(default=False, verbose_name='是否有效')),
                ('userpic',
                 models.ImageField(default='statics/images/image30.png',
                                   upload_to='statics/images/',
                                   verbose_name='头像')),
                ('gender',
                 models.CharField(choices=[('M', '男'), ('F', '女')],
                                  default='男',
                                  max_length=1,
                                  verbose_name='性别')),
                ('signature',
                 models.CharField(default='hello world',
                                  max_length=100,
                                  verbose_name='签名档(100字)')),
                ('focus_count',
                 models.IntegerField(default=0, verbose_name='关注数')),
                ('create_date',
                 models.DateTimeField(auto_now_add=True,
                                      null=True,
                                      verbose_name='用户创建时间')),
                ('focususer',
                 models.ManyToManyField(blank=True, to='app01.Admin')),
            ],
            options={
                'verbose_name_plural': '账户',
                'verbose_name': '账户',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=32,
                                  null=True,
                                  unique=True,
                                  verbose_name='类别')),
                ('administrator',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app01.Admin')),
            ],
            options={
                'verbose_name_plural': 'asked导航栏',
                'verbose_name': 'asked导航栏',
            },
        ),
        migrations.CreateModel(
            name='Chat',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField()),
                ('chat_date',
                 models.DateTimeField(auto_now_add=True, verbose_name='聊天时间')),
                ('username',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app01.Admin')),
            ],
            options={
                'verbose_name_plural': '聊天室',
                'verbose_name': '聊天室',
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=30, verbose_name='标题')),
                ('summary',
                 models.CharField(blank=True,
                                  max_length=256,
                                  null=True,
                                  verbose_name='简介')),
                ('content',
                 ckeditor.fields.RichTextField(blank=True,
                                               null=True,
                                               verbose_name='内容')),
                ('video',
                 models.FileField(
                     default='statics/video/20170209130422_Broods.mp3',
                     upload_to='statics/video/',
                     verbose_name='教程(.mp3 .mp4)')),
                ('newpic',
                 models.ImageField(default='statics/upload_imgss/logo.jpg',
                                   upload_to='statics/images/',
                                   verbose_name='封面图片')),
                ('url',
                 models.URLField(blank=True,
                                 default='www.askeds.com/server',
                                 null=True,
                                 verbose_name='链接地址')),
                ('favor_count',
                 models.IntegerField(default=0, verbose_name='点击数')),
                ('reply_count',
                 models.IntegerField(default=0, verbose_name='评论数')),
                ('focus_count',
                 models.IntegerField(default=0, verbose_name='关注数')),
                ('create_date',
                 models.DateTimeField(auto_now_add=True, verbose_name='发布时间')),
                ('category',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='app01.Category')),
                ('focususer',
                 models.ManyToManyField(blank=True,
                                        to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': '发布',
                'verbose_name': '视频教程',
            },
        ),
        migrations.CreateModel(
            name='NewType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('display',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='标签云')),
            ],
            options={
                'verbose_name_plural': '标签云',
                'verbose_name': '标签云',
            },
        ),
        migrations.CreateModel(
            name='Reply',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField()),
                ('create_date',
                 models.DateTimeField(auto_now_add=True, verbose_name='评论时间')),
                ('new',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app01.News')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app01.Admin')),
            ],
            options={
                'verbose_name_plural': 'asked评论',
                'verbose_name': 'aksed评论',
            },
        ),
        migrations.CreateModel(
            name='serverClient',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(blank=True,
                                  max_length=30,
                                  verbose_name='访问量类型')),
                ('serverclient',
                 models.IntegerField(default=0, verbose_name='访问量')),
            ],
            options={
                'verbose_name_plural': '访问量',
                'verbose_name': '访问量',
            },
        ),
        migrations.CreateModel(
            name='UserType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('dispaly',
                 models.CharField(blank=True,
                                  max_length=50,
                                  null=True,
                                  verbose_name='用户类型')),
            ],
            options={
                'verbose_name_plural': '用户类型',
                'verbose_name': '用户类型',
            },
        ),
        migrations.AddField(
            model_name='news',
            name='news_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='app01.NewType'),
        ),
        migrations.AddField(
            model_name='news',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='app01.Admin'),
        ),
        migrations.AddField(
            model_name='admin',
            name='user_type',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app01.UserType'),
        ),
        migrations.AddField(
            model_name='admin',
            name='username',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Exemplo n.º 20
0
class Migration(migrations.Migration):

    initial = True

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

    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=100,
                                           verbose_name='Назва')),
            ],
            options={
                'verbose_name': 'Категорія',
                'verbose_name_plural': 'Категорії',
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='News',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(db_index=True,
                                  max_length=150,
                                  verbose_name='Заголовок')),
                ('text',
                 models.TextField(blank=True, verbose_name='Текст статті')),
                ('created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Дата створення')),
                ('description',
                 models.CharField(blank=True,
                                  max_length=150,
                                  verbose_name='Опис')),
                ('keywords',
                 models.CharField(blank=True,
                                  max_length=350,
                                  verbose_name='Ключові слова')),
                ('category',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='news.Category',
                     verbose_name='Категорія')),
            ],
            options={
                'verbose_name': 'Стаття',
                'verbose_name_plural': 'Статті',
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=150,
                                           verbose_name='Тег')),
            ],
            options={
                'verbose_name': 'Тег',
                'verbose_name_plural': 'Тегі',
                'ordering': ['title'],
            },
        ),
        migrations.AddField(
            model_name='news',
            name='tags',
            field=models.ManyToManyField(blank=True,
                                         related_name='posts',
                                         to='news.Tag'),
        ),
        migrations.AddField(
            model_name='news',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
                verbose_name='Автор'),
        ),
    ]
Exemplo n.º 21
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')),
                ('avatar',
                 models.ImageField(blank=True, null=True, upload_to='Avatar')),
                ('phone', models.CharField(blank=True,
                                           max_length=15,
                                           null=True)),
                ('address',
                 models.CharField(blank=True, max_length=250, null=True)),
                ('gender',
                 models.PositiveSmallIntegerField(blank=True,
                                                  choices=[(0, 'MALE'),
                                                           (1, 'FEMALE')],
                                                  null=True)),
                ('activo', models.BooleanField(default=True)),
                ('creado', models.DateTimeField(auto_now_add=True)),
                ('modificado', models.DateTimeField(auto_now=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Productos',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('descripcion', models.TextField()),
                ('imagen',
                 models.ImageField(blank=True, null=True, upload_to='Imagen')),
                ('precio', models.DecimalField(decimal_places=2,
                                               max_digits=12)),
                ('cantidad', models.PositiveIntegerField()),
                ('vendedor',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='productos',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Facturas',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('nombre', models.CharField(max_length=50)),
                ('direccion', models.CharField(max_length=150)),
                ('telefono', models.CharField(max_length=10)),
                ('cantidad', models.PositiveIntegerField()),
                ('total', models.DecimalField(decimal_places=2,
                                              max_digits=12)),
                ('creado', models.DateTimeField(auto_now_add=True)),
                ('producto',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='producto',
                                   to='api.Productos')),
            ],
        ),
    ]
Exemplo n.º 22
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        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)),
                ('slug', models.SlugField()),
            ],
            options={
                'verbose_name': 'Category',
                'verbose_name_plural': 'Categories',
            },
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('slug', models.SlugField()),
                ('image',
                 models.ImageField(default='no-name.jpg',
                                   null=True,
                                   upload_to='course')),
                ('price', models.IntegerField(blank=True, default=0)),
                ('discount_price', models.IntegerField(blank=True, default=0)),
                ('no_of_students', models.IntegerField(default=0)),
                ('lessons', models.CharField(max_length=100)),
                ('viewers', models.IntegerField(default=0)),
                ('duration', models.CharField(max_length=100)),
                ('feature_course', models.BooleanField(default=False)),
                ('prequisite', models.CharField(max_length=100)),
                ('certificate', models.CharField(max_length=100)),
                ('language', models.CharField(max_length=100)),
                ('skills', models.CharField(max_length=100)),
                ('assessments', models.CharField(max_length=100)),
                ('course_description', models.TextField()),
                ('what_will_i_learn', models.TextField()),
                ('learning_outcomes', models.TextField()),
                ('category',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='categories',
                                   to='courses.category')),
                ('instructor',
                 models.ManyToManyField(to='instructor.Instructor')),
            ],
            options={
                'verbose_name': 'Course',
                'verbose_name_plural': 'Courses',
            },
        ),
        migrations.CreateModel(
            name='Course_Review',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('rating', models.CharField(max_length=100)),
                ('comments', models.TextField()),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='course_review',
                                   to='courses.course')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='course_review_user',
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Course_Review',
                'verbose_name_plural': 'Course_Review',
            },
        ),
        migrations.CreateModel(
            name='Course_Curricularm',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('lecture', models.CharField(max_length=100)),
                ('duration', models.CharField(max_length=100)),
                ('subject',
                 models.CharField(choices=[
                     ('Welcome_To_the_courses', 'Welcome To the courses'),
                     ('How_to_use', 'How to use'),
                     ('Final_chapters', 'Final chapters')
                 ],
                                  max_length=50)),
                ('course',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='course_curricularm',
                                   to='courses.course')),
            ],
            options={
                'verbose_name': 'Course_Curricularm',
                'verbose_name_plural': 'Course_Curricularm',
            },
        ),
    ]
Exemplo n.º 23
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.PositiveIntegerField(default=0)),
                ('addtocart_date_time', models.DateTimeField()),
                ('order_status', models.CharField(default=b'pending in cart', max_length=20)),
                ('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')),
                ('itemtype', models.CharField(max_length=100)),
                ('title', models.CharField(max_length=100)),
                ('max_price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('subject', models.CharField(max_length=30)),
                ('author', models.CharField(max_length=100)),
                ('publisher', models.CharField(max_length=100)),
                ('description', models.CharField(max_length=200)),
                ('quantity', models.PositiveIntegerField()),
                ('department', models.CharField(choices=[(b'COMPS', b'COMPUTERS'), (b'IT', b'INFORMATION_TECHNOLOGY'), (b'ELEX', b'ELECTRONICS'), (b'EXTC', b'ELECTRONICS_TELECOMM'), (b'MECH', b'MECHANICAL'), (b'PROD', b'PRODUCTION'), (b'BIO', b'BIOMEDICAL')], max_length=6, null=True)),
                ('year', models.CharField(choices=[(b'FE', b'FIRST_YEAR'), (b'SE', b'SECOND_YEAR'), (b'TE', b'THIRD_YEAR'), (b'BE', b'FOURTH_YEAR')], max_length=2)),
                ('image', models.ImageField(blank=True, upload_to=b'items/%Y/%m/%d')),
            ],
        ),
        migrations.CreateModel(
            name='Listing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.IntegerField()),
                ('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecommerce.Item')),
                ('order', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='ecommerce.Cart')),
            ],
        ),
        migrations.CreateModel(
            name='SiteUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('tel_no', models.CharField(max_length=20)),
                ('college', models.CharField(max_length=50)),
                ('year', models.DateField()),
                ('department', models.CharField(choices=[(b'COMPS', b'COMPUTERS'), (b'IT', b'INFORMATION_TECHNOLOGY'), (b'ELEX', b'ELECTRONICS'), (b'EXTC', b'ELECTRONICS_TELECOMM'), (b'MECH', b'MECHANICAL'), (b'PROD', b'PRODUCTION'), (b'BIO', b'BIOMEDICAL')], max_length=6, null=True)),
                ('address', models.CharField(max_length=100)),
                ('auth_user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserSession',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sessions.Session')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='listing',
            name='seller',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ecommerce.SiteUser'),
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='UserAssessment',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('created_on',
                 models.DateTimeField(auto_now_add=True, null=True)),
                ('modified_on', models.DateTimeField(auto_now=True,
                                                     null=True)),
                ('title', models.CharField(max_length=255)),
                ('instructions', models.TextField()),
                ('created_by',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='module_userassessment_created_by_related',
                     to=settings.AUTH_USER_MODEL)),
                ('modified_by',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='module_userassessment_modified_by_related',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_on'],
            },
        ),
        migrations.AlterModelOptions(
            name='module',
            options={
                'ordering': ['order'],
                'verbose_name_plural': 'Modules'
            },
        ),
        migrations.AddField(
            model_name='module',
            name='has_user_assessment',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='module',
            name='user_assessment',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='module.UserAssessment'),
        ),
    ]
Exemplo n.º 25
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Association',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('server_url', models.CharField(max_length=255)),
                ('handle', models.CharField(max_length=255)),
                ('secret', models.CharField(max_length=255)),
                ('issued', models.IntegerField()),
                ('lifetime', models.IntegerField()),
                ('assoc_type', models.CharField(max_length=64)),
            ],
            options={
                'db_table': 'social_auth_association',
            },
            bases=(models.Model, social.storage.django_orm.DjangoAssociationMixin),
        ),
        migrations.CreateModel(
            name='Code',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('email', models.EmailField(max_length=75)),
                ('code', models.CharField(max_length=32, db_index=True)),
                ('verified', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'social_auth_code',
            },
            bases=(models.Model, social.storage.django_orm.DjangoCodeMixin),
        ),
        migrations.CreateModel(
            name='Nonce',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('server_url', models.CharField(max_length=255)),
                ('timestamp', models.IntegerField()),
                ('salt', models.CharField(max_length=65)),
            ],
            options={
                'db_table': 'social_auth_nonce',
            },
            bases=(models.Model, social.storage.django_orm.DjangoNonceMixin),
        ),
        migrations.CreateModel(
            name='UserSocialAuth',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('provider', models.CharField(max_length=32)),
                ('uid', models.CharField(max_length=255)),
                ('extra_data', social.apps.django_app.default.fields.JSONField(default=b'{}')),
                ('user', models.ForeignKey(related_name='social_auth', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'social_auth_usersocialauth',
            },
            bases=(models.Model, social.storage.django_orm.DjangoUserMixin),
        ),
        migrations.AlterUniqueTogether(
            name='usersocialauth',
            unique_together=set([('provider', 'uid')]),
        ),
        migrations.AlterUniqueTogether(
            name='code',
            unique_together=set([('email', 'code')]),
        ),
    ]
Exemplo n.º 26
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Friend',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=30)),
                ('category', models.CharField(default='', max_length=30)),
                ('social_id', models.CharField(max_length=100, null=True)),
                ('friendee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'friend',
            },
        ),
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(default='', max_length=30)),
                ('message', models.TextField(default='')),
                ('time', models.DateTimeField(default=None)),
                ('social_id', models.CharField(max_length=100, null=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main_app.Friend')),
                ('owner', models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'message',
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fb_name', models.CharField(default='', max_length=30)),
                ('fb_token', models.TextField(default='')),
                ('fb_id', models.TextField(default='')),
                ('twitter_name', models.CharField(default='', max_length=30)),
                ('resource_owner_key', models.TextField(default='')),
                ('resource_owner_secret', models.TextField(default='')),
                ('twitter_id', models.TextField(default='')),
                ('last_query', models.DateTimeField(null=True)),
                ('last_fetch', models.DateTimeField(null=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'user_profile',
            },
        ),
        migrations.AlterUniqueTogether(
            name='userprofile',
            unique_together=set([('user',)]),
        ),
    ]
Exemplo n.º 27
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=50)),
                ('slug',
                 models.SlugField(allow_unicode=True,
                                  max_length=100,
                                  unique=True)),
            ],
            options={
                'verbose_name': 'category',
                'verbose_name_plural': 'categories',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password', models.CharField(max_length=32)),
                ('content', models.TextField(max_length=2000)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('is_public', models.BooleanField(default=False)),
                ('author',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('content', models.TextField()),
                ('slug',
                 models.SlugField(allow_unicode=True,
                                  max_length=200,
                                  unique=True)),
                ('Comments',
                 models.PositiveSmallIntegerField(default=0, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('published', models.DateTimeField(blank=True, null=True)),
                ('image',
                 models.ImageField(blank=True,
                                   default='default.png',
                                   upload_to='post/%Y/%m/%d')),
            ],
            options={
                'ordering': ['-created'],
            },
        ),
        migrations.CreateModel(
            name='TagModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.AddField(
            model_name='post',
            name='Tags',
            field=models.ManyToManyField(blank=True, to='blog.TagModel'),
        ),
        migrations.AddField(
            model_name='post',
            name='author',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='post',
            name='category',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='posts',
                to='blog.Category'),
        ),
        migrations.AddField(
            model_name='comment',
            name='post',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='comments',
                to='blog.Post'),
        ),
        migrations.AlterIndexTogether(
            name='post',
            index_together={('id', 'slug')},
        ),
    ]
Exemplo n.º 28
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='team',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('team_name', models.CharField(max_length=255)),
                ('team_leader_github', models.CharField(max_length=255)),
                ('member1_github', models.CharField(max_length=255)),
                ('member2_github',
                 models.CharField(blank=True, max_length=255, null=True)),
                ('member3_github',
                 models.CharField(blank=True, max_length=255, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='phaseSelectionModel',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('section1', models.BooleanField(default=True)),
                ('section2', models.BooleanField(default=False)),
                ('section3', models.BooleanField(default=False)),
                ('section4', models.BooleanField(default=False)),
                ('final', models.BooleanField(default=False)),
                ('team',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='accounts.team')),
            ],
        ),
        migrations.CreateModel(
            name='manageTeam',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.CharField(choices=[('j', 'judge'), ('o', 'organiser'),
                                           ('m', 'mentor')],
                                  max_length=255)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 29
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=24)),
                ('visit', models.IntegerField(default=0)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='group',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=24)),
                ('content', models.TextField()),
                ('visit', models.IntegerField(default=0)),
                ('recommend', models.IntegerField(default=0)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('group',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='groups.Group')),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='post',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('content', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('owner',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='comment',
                                   to=settings.AUTH_USER_MODEL)),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='groups.Post')),
            ],
        ),
    ]
Exemplo n.º 30
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Algorithm',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('identifier', models.CharField(default='default_identifier', help_text='Имя переменной, идентификатор для исопльзования в коде', max_length=200, unique=True)),
                ('name', models.CharField(help_text='Название для понимания', max_length=200, unique=True)),
            ],
            options={
                'verbose_name': 'Алгоритм',
                'verbose_name_plural': 'Алгоритмы',
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='FacadeMaterial',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('coord', models.TextField(blank=True, null=True)),
                ('material_id', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'Сектор отделки фасада',
                'verbose_name_plural': 'Сектора отделки фасада',
                'ordering': ('material_type', 'material_id'),
            },
        ),
        migrations.CreateModel(
            name='FacadeMaterialType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Название для понимания', max_length=200, unique=True)),
                ('identifier', models.CharField(choices=[('brick', 'Облицовочный кирпич'), ('plaster', 'Штукатурка'), ('tile', 'Плитка')], default='brick', help_text='Идентификатор для использования в коде', max_length=20)),
            ],
            options={
                'verbose_name': 'Тип фасадного (облицовочного) материала',
                'verbose_name_plural': 'Типы фасадных (облицовочных) материалов',
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('scheme', models.TextField(blank=True, null=True)),
                ('checked', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'Проект',
                'verbose_name_plural': 'Проекты',
            },
        ),
        migrations.CreateModel(
            name='Shell',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('roof_material_id', models.IntegerField(help_text='id материала кровли из той таблицы типа материала, который выбрал пользователь')),
                ('soffit_style', models.CharField(choices=[('horizontal', 'Горизонтальный'), ('inclined', 'Наклонный')], default='horizontal', help_text='Стиль нижней части свеса', max_length=20)),
                ('wall_material_0_id', models.IntegerField(help_text='id материала из той таблицы типа материала, который выбрал пользователь')),
                ('socle_material_id', models.IntegerField(help_text='id материала из той таблицы типа материала, который выбрал пользователь')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='Автор')),
            ],
            options={
                'verbose_name': 'Шаблон оформления фасада',
                'verbose_name_plural': 'Шаблоны оформления фасада',
            },
        ),
    ]
Exemplo n.º 31
0
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('passionProjectApp', '0008_auto_20190612_1348'),
    ]

    operations = [
        migrations.AddField(
            model_name='answercomment',
            name='downvote',
            field=models.ManyToManyField(blank=True, related_name='anscom_downvotes', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='answercomment',
            name='upvote',
            field=models.ManyToManyField(blank=True, related_name='anscom_upvotes', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='realquestioncomment',
            name='downvote',
            field=models.ManyToManyField(blank=True, related_name='questcom_downvotes', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='realquestioncomment',
            name='upvote',
            field=models.ManyToManyField(blank=True, related_name='questcom_upvotes', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='answer',
            name='date_created',
            field=models.DateTimeField(default=datetime.datetime.utcnow),
        ),
        migrations.AlterField(
            model_name='answer',
            name='last_update',
            field=models.DateTimeField(default=datetime.datetime.utcnow),
        ),
        migrations.AlterField(
            model_name='answercomment',
            name='date_created',
            field=models.DateTimeField(default=datetime.datetime.now),
        ),
        migrations.AlterField(
            model_name='answercomment',
            name='last_update',
            field=models.DateTimeField(default=datetime.datetime.now),
        ),
        migrations.AlterField(
            model_name='realquestion',
            name='date_created',
            field=models.DateTimeField(default=datetime.datetime.utcnow),
        ),
        migrations.AlterField(
            model_name='realquestion',
            name='last_update',
            field=models.DateTimeField(default=datetime.datetime.utcnow),
        ),
        migrations.AlterField(
            model_name='realquestioncomment',
            name='date_created',
            field=models.DateTimeField(default=datetime.datetime.utcnow),
        ),
        migrations.AlterField(
            model_name='realquestioncomment',
            name='last_update',
            field=models.DateTimeField(default=datetime.datetime.utcnow),
        ),
    ]
Exemplo n.º 32
0
from rooibos.util.database_operations import db_table_exists

MIGRATION_DEPS = [
    ('contenttypes', '0002_remove_content_type_name'),
    ('auth', '0006_require_contenttypes_0002'),
    ('flatpages', '__first__'),
    ('admin', '__first__'),
    ('sessions', '__first__'),
    ('sites', '__first__'),
    ('redirects', '__first__'),
    ('django_comments', '__first__'),
    ('impersonate', '__first__'),
    ('util', '__first__'),
    ('migration', '__first__'),
    ('tagging', '__first__'),
    migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

if db_table_exists('django_content_type'):
    FIRST_DEPS = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('auth', '0006_require_contenttypes_0002'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]
else:
    FIRST_DEPS = [
        ('contenttypes', '__first__'),
    ]

# DEPENDENCIES = FIRST_DEPS + MIGRATION_DEPS
DEPENDENCIES = MIGRATION_DEPS
Exemplo n.º 33
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Author',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(max_length=100)),
                ('last_name', models.CharField(max_length=100)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('date_of_death',
                 models.DateField(blank=True, null=True, verbose_name='Died')),
            ],
            options={
                'ordering': ['last_name'],
            },
        ),
        migrations.CreateModel(
            name='Book',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('summary',
                 models.TextField(
                     help_text='Enter a brief description of the book',
                     max_length=3000)),
                ('isbn',
                 models.CharField(
                     help_text=
                     '13 Character <a href="https://www.isbn-international.org/content/what-isbn">ISBN number</a>',
                     max_length=13,
                     verbose_name='ISBN')),
                ('author',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='catalog.Author')),
            ],
        ),
        migrations.CreateModel(
            name='BookInstance',
            fields=[
                ('id',
                 models.UUIDField(
                     default=uuid.uuid4,
                     help_text=
                     'Unique ID for this particular book across whole library',
                     primary_key=True,
                     serialize=False)),
                ('imprint', models.CharField(max_length=200)),
                ('due_back', models.DateField(blank=True, null=True)),
                ('status',
                 models.CharField(blank=True,
                                  choices=[('d', 'Maintenance'),
                                           ('o', 'On loan'),
                                           ('a', 'Available'),
                                           ('r', 'Reserved'),
                                           ('n', 'Not Available')],
                                  default='d',
                                  help_text='Book availability',
                                  max_length=1)),
                ('book',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='catalog.Book')),
                ('borrower',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['due_back'],
                'permissions':
                (('can_mark_returned', 'Set book as returned'), ),
            },
        ),
        migrations.CreateModel(
            name='Genre',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(
                     help_text=
                     'Enter a book genre (e.g. Science Fiction, French Poetry etc.)',
                     max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(
                     default='',
                     help_text=
                     "Enter a the book's natural language (e.g. English, French, Japanese etc.)",
                     max_length=200)),
            ],
        ),
        migrations.AddField(
            model_name='book',
            name='genre',
            field=models.ManyToManyField(
                help_text='Select a genre for this book', to='catalog.Genre'),
        ),
        migrations.AddField(
            model_name='book',
            name='language',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='catalog.Language'),
        ),
    ]
from django.conf import settings
from django.db import migrations, models


# Can't use the callable because the app registry is not ready yet.
# Really trusting users here... bad idea? probably.
DJSTRIPE_UNSAFE_SUBSCRIBER_MODEL = getattr(settings, "DJSTRIPE_SUBSCRIBER_MODEL", settings.AUTH_USER_MODEL)

# Needed here for external apps that have added the DJSTRIPE_UNSAFE_SUBSCRIBER_MODEL
# *not* in the '__first__' migration of the app, which results in:
# ValueError: Related model 'DJSTRIPE_SUBSCRIBER_MODEL' cannot be resolved
DJSTRIPE_SUBSCRIBER_MODEL_MIGRATION_DEPENDENCY = getattr(settings,
                                                         "DJSTRIPE_SUBSCRIBER_MODEL_MIGRATION_DEPENDENCY",
                                                         '__first__')

DJSTRIPE_UNSAFE_SUBSCRIBER_MODEL_DEPENDENCY = migrations.swappable_dependency(DJSTRIPE_UNSAFE_SUBSCRIBER_MODEL)

if DJSTRIPE_UNSAFE_SUBSCRIBER_MODEL != settings.AUTH_USER_MODEL:
    DJSTRIPE_UNSAFE_SUBSCRIBER_MODEL_DEPENDENCY = migrations.migration.SwappableTuple(
        (DJSTRIPE_UNSAFE_SUBSCRIBER_MODEL.split(".", 1)[0], DJSTRIPE_SUBSCRIBER_MODEL_MIGRATION_DEPENDENCY),
        DJSTRIPE_UNSAFE_SUBSCRIBER_MODEL
    )


class Migration(migrations.Migration):
    # not that squashmigrations generates [(b'djstripe', '0001_initial'),....
    # but for django in python3.X it needs to be [('djstripe', '0001_initial'),.... in order for the dependency
    # graph loader to remove the migrations this replaces
    replaces = [('djstripe', '0001_initial'), ('djstripe', '0002_auto_20150122_2000'),
                ('djstripe', '0003_auto_20150128_0800'), ('djstripe', '0004_auto_20150427_1609'),
                ('djstripe', '0005_charge_captured'), ('djstripe', '0006_auto_20150602_1934'),
Exemplo n.º 35
0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import swapper
from django.db import models, migrations
from decimal import Decimal
import model_utils.fields
import django.utils.timezone
from django.conf import settings

dependancies = [
    migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ('contenttypes', '0001_initial'),
]

swappable_dep = swapper.dependency('star_ratings', 'Rating')
if swappable_dep == migrations.swappable_dependency('star_ratings.Rating'):
    dependancies.append(swappable_dep)


class Migration(migrations.Migration):
    dependencies = dependancies

    operations = [
        migrations.CreateModel(
            name='Rating',
            fields=[
                ('id', models.AutoField(verbose_name='ID', auto_created=True, primary_key=True, serialize=False)),
                ('count', models.PositiveIntegerField(default=0)),
                ('total', models.PositiveIntegerField(default=0)),
                ('average', models.DecimalField(decimal_places=3, max_digits=6, default=Decimal('0'))),