コード例 #1
0
class Migration(migrations.Migration):

    dependencies = [
        ('address', '0003_auto_20200830_1851'),
        ('user', '0001_initial'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='user',
            name='username',
        ),
        migrations.CreateModel(
            name='Volunteer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('picture', models.ImageField(blank=True, upload_to='')),
                ('intro', models.TextField(blank=True, max_length=300)),
                ('phone',
                 phone_field.models.PhoneField(help_text='Phone Number',
                                               max_length=31)),
                ('address',
                 address.models.AddressField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('address', '0002_auto_20160213_1726'),
        ('accounts', '0006_auto_20200610_1901'),
    ]

    operations = [
        migrations.AlterField(
            model_name='regiprofile',
            name='pet_image',
            field=models.ImageField(blank=True,
                                    null=True,
                                    upload_to='',
                                    verbose_name='6. 프로필 사진'),
        ),
        migrations.AlterField(
            model_name='regiprofile',
            name='pet_intro',
            field=models.TextField(max_length=100,
                                   null=True,
                                   verbose_name='7. 소개'),
        ),
        migrations.AlterField(
            model_name='regiprofile',
            name='pet_locate',
            field=models.TextField(max_length=50,
                                   null=True,
                                   verbose_name='5. 주소'),
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address',
                 address.models.AddressField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address')),
            ],
        ),
    ]
コード例 #3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('address', '0002_auto_20160213_1726'),
        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')),
                ('name', models.CharField(max_length=100)),
                ('surname', models.CharField(max_length=50)),
                ('image',
                 models.ImageField(default='default.jpg',
                                   upload_to='profile_pics')),
                ('cellphone', models.CharField(max_length=10)),
                ('address1',
                 address.models.AddressField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address')),
                ('address2',
                 address.models.AddressField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='+',
                     to='address.Address')),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('address', '0003_auto_20200830_1851'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Church',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('picture', models.ImageField(blank=True, upload_to='')),
                ('description', models.TextField(blank=True, max_length=1000)),
                ('pastor_name', models.CharField(max_length=254)),
                ('phone',
                 phone_field.models.PhoneField(help_text='Phone Number',
                                               max_length=31)),
                ('is_active', models.BooleanField(default=True)),
                ('date_joined',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('slug', models.SlugField(unique=True)),
                ('address',
                 address.models.AddressField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
コード例 #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('address', '0002_auto_20160213_1726'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Abilities',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Abilities')),
            ],
        ),
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='Activity type')),
                ('slug',
                 autoslug.fields.AutoSlugField(default='',
                                               editable=False,
                                               populate_from='name')),
                ('description',
                 django_markdown.models.MarkdownField(
                     default='', verbose_name='Activity description')),
                ('picture',
                 models.ImageField(upload_to='activities/',
                                   verbose_name='Image')),
            ],
        ),
        migrations.CreateModel(
            name='Condition',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='Condition Type')),
                ('resume',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='Condition resume')),
                ('description',
                 models.TextField(default='',
                                  verbose_name='Condition description')),
                ('price',
                 models.IntegerField(blank=True,
                                     default=5,
                                     verbose_name='Price')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=150,
                                  null=True,
                                  verbose_name='Title')),
                ('published',
                 models.BooleanField(default=False, verbose_name='Published')),
                ('publish_at',
                 models.DateTimeField(
                     default=django.utils.timezone.now,
                     verbose_name='Publication date and time')),
                ('slug',
                 autoslug.fields.AutoSlugField(default='',
                                               editable=False,
                                               populate_from='title',
                                               unique=True)),
                ('starts_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='Start date and time')),
                ('ends_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='End date and time')),
                ('available_seats',
                 models.IntegerField(blank=True,
                                     default=0,
                                     verbose_name='Available seats')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('attendees',
                 models.ManyToManyField(blank=True,
                                        related_name='attendee_user',
                                        to=settings.AUTH_USER_MODEL,
                                        verbose_name='Attendees')),
                ('condition',
                 models.ManyToManyField(blank=True,
                                        related_name='condition_activity',
                                        to='plateformeweb.Condition',
                                        verbose_name='Conditions')),
            ],
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='Organization name')),
                ('description',
                 django_markdown.models.MarkdownField(
                     default='', verbose_name='Activity description')),
                ('picture',
                 models.ImageField(null=True,
                                   upload_to='organizations/',
                                   verbose_name='Image')),
                ('active', models.BooleanField(verbose_name='Active')),
                ('slug',
                 autoslug.fields.AutoSlugField(default='',
                                               editable=False,
                                               populate_from='name',
                                               unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('owner',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrganizationPerson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.SmallIntegerField(choices=[(0, 'Visitor'),
                                                   (10, 'Member'),
                                                   (20, 'Volunteer'),
                                                   (30, 'Admin')],
                                          default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Place',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('description',
                 django_markdown.models.MarkdownField(
                     default='', verbose_name='Place description')),
                ('slug',
                 autoslug.fields.AutoSlugField(default='',
                                               editable=False,
                                               populate_from='name',
                                               unique=True)),
                ('picture',
                 models.ImageField(upload_to='places/', verbose_name='Image')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('address',
                 address.models.AddressField(
                     default='',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address',
                     verbose_name='Postal address')),
                ('organization',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='plateformeweb.Organization')),
                ('owner',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PlaceType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Type')),
                ('slug',
                 autoslug.fields.AutoSlugField(editable=False,
                                               populate_from='name',
                                               unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='OrganizationVolunteer',
            fields=[
                ('organizationperson_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='plateformeweb.OrganizationPerson')),
                ('tagline', models.TextField(verbose_name='Tagline')),
                ('abilities',
                 models.ManyToManyField(to='plateformeweb.Abilities')),
            ],
            bases=('plateformeweb.organizationperson', ),
        ),
        migrations.AddField(
            model_name='place',
            name='type',
            field=models.ForeignKey(on_delete=models.SET(
                plateformeweb.models.PlaceType.get_other_place),
                                    to='plateformeweb.PlaceType',
                                    verbose_name='Type'),
        ),
        migrations.AddField(
            model_name='organizationperson',
            name='organization',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='plateformeweb.Organization'),
        ),
        migrations.AddField(
            model_name='organizationperson',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='event',
            name='location',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='plateformeweb.Place'),
        ),
        migrations.AddField(
            model_name='event',
            name='organization',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='plateformeweb.Organization'),
        ),
        migrations.AddField(
            model_name='event',
            name='organizers',
            field=models.ManyToManyField(blank=True,
                                         related_name='organizer_user',
                                         to=settings.AUTH_USER_MODEL,
                                         verbose_name='Organizers'),
        ),
        migrations.AddField(
            model_name='event',
            name='owner',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='event',
            name='presents',
            field=models.ManyToManyField(blank=True,
                                         related_name='present_user',
                                         to=settings.AUTH_USER_MODEL,
                                         verbose_name='Presents'),
        ),
        migrations.AddField(
            model_name='event',
            name='type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='plateformeweb.Activity'),
        ),
        migrations.AddField(
            model_name='condition',
            name='organization',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='plateformeweb.Organization'),
        ),
        migrations.AddField(
            model_name='activity',
            name='organization',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='plateformeweb.Organization'),
        ),
        migrations.CreateModel(
            name='OrganizationAdministrator',
            fields=[],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('plateformeweb.organizationperson', ),
        ),
        migrations.CreateModel(
            name='OrganizationMember',
            fields=[],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('plateformeweb.organizationperson', ),
        ),
        migrations.CreateModel(
            name='OrganizationVisitor',
            fields=[],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('plateformeweb.organizationperson', ),
        ),
        migrations.CreateModel(
            name='PublishedEvent',
            fields=[],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('plateformeweb.event', ),
        ),
        migrations.AlterUniqueTogether(
            name='organizationperson',
            unique_together=set([('organization', 'user', 'role')]),
        ),
    ]
コード例 #6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('address', '0002_auto_20160213_1726'),
    ]

    operations = [
        migrations.CreateModel(
            name='General',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('state',
                 models.TextField(choices=[('0', 'DISABLED'),
                                           ('1', 'ENABLED')],
                                  default='1')),
                ('creation',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('last_modification',
                 models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Action',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('act', models.TextField(default='')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='AttributeProduct',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('text', models.TextField(default='')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='ImageProduct',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('alt', models.TextField(blank=True, default='')),
                ('short_title', models.CharField(default='', max_length=100)),
                ('description', models.TextField(default='')),
                ('URL', models.CharField(default='', max_length=1000)),
                ('image',
                 models.ImageField(default='app/static/img/tortuga.jpg',
                                   upload_to='app/static/img/')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='LanguagePerson',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('lang', models.CharField(default='ESPANOL', max_length=100)),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='LineReservation',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('quantity',
                 models.IntegerField(
                     default=1,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('date_start', models.DateField(blank=True, null=True)),
                ('date_end',
                 models.DateField(default=django.utils.timezone.now)),
                ('cost_price',
                 models.IntegerField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('payment_guide',
                 models.TextField(choices=[('P', 'PAID'), ('NP', 'NOT PAID')],
                                  default='NP')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('address',
                 address.models.AddressField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Mail',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('email', models.EmailField(default='', max_length=254)),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='PaymentReservation',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('price',
                 models.IntegerField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('date',
                 models.DateTimeField(default=django.utils.timezone.now)),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('NIN', models.IntegerField(blank=True, null=True)),
                ('name', models.CharField(default='', max_length=100)),
                ('fam_name',
                 models.CharField(blank=True,
                                  default='',
                                  max_length=100,
                                  null=True)),
                ('date_birth', models.DateField(blank=True, null=True)),
                ('nationality',
                 django_countries.fields.CountryField(blank=True,
                                                      max_length=2,
                                                      null=True)),
                ('name_Hotel',
                 models.TextField(blank=True, default='', null=True)),
                ('detail_location',
                 models.TextField(blank=True, default='', null=True)),
                ('language',
                 models.ManyToManyField(blank=True, to='app.LanguagePerson')),
                ('location',
                 models.ManyToManyField(blank=True, to='app.Location')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Phone',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('tel',
                 phonenumber_field.modelfields.PhoneNumberField(default='',
                                                                max_length=128,
                                                                region=None)),
                ('per',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='app.Person')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='PriceProduct',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('year',
                 models.IntegerField(choices=[(1900, 1900), (1901, 1901),
                                              (1902, 1902), (1903, 1903),
                                              (1904, 1904), (1905, 1905),
                                              (1906, 1906), (1907, 1907),
                                              (1908, 1908), (1909, 1909),
                                              (1910, 1910), (1911, 1911),
                                              (1912, 1912), (1913, 1913),
                                              (1914, 1914), (1915, 1915),
                                              (1916, 1916), (1917, 1917),
                                              (1918, 1918), (1919, 1919),
                                              (1920, 1920), (1921, 1921),
                                              (1922, 1922), (1923, 1923),
                                              (1924, 1924), (1925, 1925),
                                              (1926, 1926), (1927, 1927),
                                              (1928, 1928), (1929, 1929),
                                              (1930, 1930), (1931, 1931),
                                              (1932, 1932), (1933, 1933),
                                              (1934, 1934), (1935, 1935),
                                              (1936, 1936), (1937, 1937),
                                              (1938, 1938), (1939, 1939),
                                              (1940, 1940), (1941, 1941),
                                              (1942, 1942), (1943, 1943),
                                              (1944, 1944), (1945, 1945),
                                              (1946, 1946), (1947, 1947),
                                              (1948, 1948), (1949, 1949),
                                              (1950, 1950), (1951, 1951),
                                              (1952, 1952), (1953, 1953),
                                              (1954, 1954), (1955, 1955),
                                              (1956, 1956), (1957, 1957),
                                              (1958, 1958), (1959, 1959),
                                              (1960, 1960), (1961, 1961),
                                              (1962, 1962), (1963, 1963),
                                              (1964, 1964), (1965, 1965),
                                              (1966, 1966), (1967, 1967),
                                              (1968, 1968), (1969, 1969),
                                              (1970, 1970), (1971, 1971),
                                              (1972, 1972), (1973, 1973),
                                              (1974, 1974), (1975, 1975),
                                              (1976, 1976), (1977, 1977),
                                              (1978, 1978), (1979, 1979),
                                              (1980, 1980), (1981, 1981),
                                              (1982, 1982), (1983, 1983),
                                              (1984, 1984), (1985, 1985),
                                              (1986, 1986), (1987, 1987),
                                              (1988, 1988), (1989, 1989),
                                              (1990, 1990), (1991, 1991),
                                              (1992, 1992), (1993, 1993),
                                              (1994, 1994), (1995, 1995),
                                              (1996, 1996), (1997, 1997),
                                              (1998, 1998), (1999, 1999),
                                              (2000, 2000), (2001, 2001),
                                              (2002, 2002), (2003, 2003),
                                              (2004, 2004), (2005, 2005),
                                              (2006, 2006), (2007, 2007),
                                              (2008, 2008), (2009, 2009),
                                              (2010, 2010), (2011, 2011),
                                              (2012, 2012), (2013, 2013),
                                              (2014, 2014), (2015, 2015),
                                              (2016, 2016), (2017, 2017),
                                              (2018, 2018), (2019, 2019),
                                              (2020, 2020), (2021, 2021),
                                              (2022, 2022), (2023, 2023),
                                              (2024, 2024), (2025, 2025),
                                              (2026, 2026), (2027, 2027),
                                              (2028, 2028)],
                                     default=2019)),
                ('net',
                 models.DecimalField(
                     decimal_places=3,
                     default=0,
                     max_digits=6,
                     validators=[
                         django.core.validators.MinValueValidator(0.0)
                     ])),
                ('rack',
                 models.DecimalField(
                     decimal_places=3,
                     default=0,
                     max_digits=6,
                     validators=[
                         django.core.validators.MinValueValidator(0.0)
                     ])),
                ('date_start_offer',
                 models.DateField(default=django.utils.timezone.now)),
                ('date_end_offer', models.DateField(blank=True, null=True)),
                ('information', models.TextField(blank=True, null=True)),
                ('specialoffer_percent_discount',
                 models.IntegerField(
                     default=0,
                     validators=[
                         django.core.validators.MaxValueValidator(100),
                         django.core.validators.MinValueValidator(0)
                     ])),
                ('category',
                 models.TextField(choices=[('N', 'NINOS'), ('A', 'ADULTOS')],
                                  default='A')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('type',
                 models.TextField(choices=[('SERVICE', 'SERVICE'),
                                           ('MERCHANDISE', 'MERCHANDISE')],
                                  default='SERVICE')),
                ('name', models.CharField(default='', max_length=1000)),
                ('description', models.TextField(default='')),
                ('attribute',
                 models.ManyToManyField(blank=True,
                                        to='app.AttributeProduct')),
                ('image',
                 models.ManyToManyField(blank=True, to='app.ImageProduct')),
                ('location',
                 models.ManyToManyField(blank=True, to='app.Location')),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Rate',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('text', models.CharField(max_length=100)),
                ('percentage',
                 models.IntegerField(
                     default=0,
                     validators=[
                         django.core.validators.MaxValueValidator(100),
                         django.core.validators.MinValueValidator(0)
                     ])),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Reservation',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     to='app.General')),
                ('number_reservation',
                 models.AutoField(primary_key=True, serialize=False)),
                ('payment_state',
                 models.TextField(choices=[('P', 'PAID'),
                                           ('W', 'WAITING FOR PAYMENT'),
                                           ('SB', 'STANDBY')],
                                  default='W')),
                ('more_info',
                 models.TextField(blank=True, default='', null=True)),
                ('total_payments', models.IntegerField(null=True)),
                ('total_to_pay', models.IntegerField(null=True)),
                ('total_costs', models.IntegerField(null=True)),
                ('user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='StockProduct',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('nb_shop',
                 models.IntegerField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
                ('nb_stock',
                 models.IntegerField(
                     default=0,
                     validators=[django.core.validators.MinValueValidator(0)
                                 ])),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('description', models.TextField(default='')),
                ('assigned_date',
                 models.DateField(default=django.utils.timezone.now)),
                ('delivery_date', models.DateField(blank=True, null=True)),
                ('cause', models.TextField(blank=True, null=True)),
                ('assigner_auto',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('task_state',
                 models.TextField(choices=[('D', 'DONE'), ('TD', 'TODO'),
                                           ('SB', 'STANDBY')],
                                  default='TD')),
                ('assigned_user',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='Tax',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('text', models.TextField(default='')),
                ('percentage',
                 models.IntegerField(
                     default=0,
                     validators=[
                         django.core.validators.MinValueValidator(0),
                         django.core.validators.MaxValueValidator(100)
                     ])),
                ('year',
                 models.IntegerField(choices=[(1980, 1980), (1981, 1981),
                                              (1982, 1982), (1983, 1983),
                                              (1984, 1984), (1985, 1985),
                                              (1986, 1986), (1987, 1987),
                                              (1988, 1988), (1989, 1989),
                                              (1990, 1990), (1991, 1991),
                                              (1992, 1992), (1993, 1993),
                                              (1994, 1994), (1995, 1995),
                                              (1996, 1996), (1997, 1997),
                                              (1998, 1998), (1999, 1999),
                                              (2000, 2000), (2001, 2001),
                                              (2002, 2002), (2003, 2003),
                                              (2004, 2004), (2005, 2005),
                                              (2006, 2006), (2007, 2007),
                                              (2008, 2008), (2009, 2009),
                                              (2010, 2010), (2011, 2011),
                                              (2012, 2012), (2013, 2013),
                                              (2014, 2014), (2015, 2015),
                                              (2016, 2016), (2017, 2017),
                                              (2018, 2018), (2019, 2019),
                                              (2020, 2020), (2021, 2021),
                                              (2022, 2022), (2023, 2023),
                                              (2024, 2024), (2025, 2025),
                                              (2026, 2026), (2027, 2027),
                                              (2028, 2028)],
                                     default=2019)),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='TypePayment',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('type', models.CharField(default='CASH', max_length=100)),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='TypePerson',
            fields=[
                ('general_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.General')),
                ('type', models.CharField(default='CLIENTE', max_length=100)),
            ],
            bases=('app.general', ),
        ),
        migrations.CreateModel(
            name='AgeDiscount',
            fields=[
                ('rate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.Rate')),
            ],
            bases=('app.rate', ),
        ),
        migrations.CreateModel(
            name='RateDiscount',
            fields=[
                ('rate_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='app.Rate')),
            ],
            bases=('app.rate', ),
        ),
        migrations.AddField(
            model_name='product',
            name='stock',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.StockProduct'),
        ),
        migrations.AddField(
            model_name='priceproduct',
            name='price_product',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Product'),
        ),
        migrations.AddField(
            model_name='priceproduct',
            name='tax_price',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='app.Tax'),
        ),
        migrations.AddField(
            model_name='person',
            name='product',
            field=models.ManyToManyField(blank=True, to='app.Product'),
        ),
        migrations.AddField(
            model_name='person',
            name='type',
            field=models.ForeignKey(
                blank=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='app.TypePerson'),
        ),
        migrations.AddField(
            model_name='paymentreservation',
            name='payment_reservation',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to='app.Reservation'),
        ),
        migrations.AddField(
            model_name='paymentreservation',
            name='type_payment',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='app.TypePayment'),
        ),
        migrations.AddField(
            model_name='mail',
            name='per',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='app.Person'),
        ),
        migrations.AddField(
            model_name='linereservation',
            name='client',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name='clientXperson',
                to='app.Person'),
        ),
        migrations.AddField(
            model_name='linereservation',
            name='guide',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name='lineXguide',
                to='app.Person'),
        ),
        migrations.AddField(
            model_name='linereservation',
            name='line_product',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name='lineXproduct',
                to='app.Product'),
        ),
        migrations.AddField(
            model_name='linereservation',
            name='line_reservation',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='lineXreservation',
                to='app.Reservation'),
        ),
        migrations.AddField(
            model_name='linereservation',
            name='sell_price',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='lineXprice',
                to='app.PriceProduct'),
        ),
        migrations.AddField(
            model_name='priceproduct',
            name='age_discount',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='app.AgeDiscount'),
        ),
        migrations.AddField(
            model_name='priceproduct',
            name='rate_discount',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to='app.RateDiscount'),
        ),
    ]
コード例 #7
0
class Migration(migrations.Migration):

    dependencies = [
        ('address', '0002_auto_20160213_1726'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('club', '0005_auto_20180720_1847'),
    ]

    operations = [
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(max_length=255)),
                ('cover_image', models.ImageField(null=True, upload_to='')),
                ('start_date', models.DateTimeField()),
                ('end_date', models.DateTimeField()),
                ('od', models.BooleanField(default=False)),
                ('description', models.TextField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EventRegistration',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('rsvp',
                 models.CharField(choices=[('yes', 'Yes'), ('no', 'No'),
                                           ('maybe', 'Maybe')],
                                  default='yes',
                                  max_length=5)),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='club.Event')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='EventRegistrationAnswers',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('answer', models.TextField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='EventRegistrationQuestions',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('question', models.CharField(max_length=1000)),
                ('input_type',
                 models.CharField(choices=[('text', 'TextBox'),
                                           ('textarea', 'TextArea'),
                                           ('radio', 'Single Choice Radio'),
                                           ('select', 'Select'),
                                           ('number', 'Number')],
                                  max_length=40)),
                ('input_meta', models.TextField(null=True)),
                ('required', models.BooleanField(default=False)),
                ('order', models.IntegerField()),
                ('event',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='club.Event')),
            ],
        ),
        migrations.AddField(
            model_name='club',
            name='date_created',
            field=models.DateTimeField(auto_now_add=True,
                                       default=django.utils.timezone.now),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='club',
            name='date_modified',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AddField(
            model_name='clubmemberroles',
            name='date_created',
            field=models.DateTimeField(auto_now_add=True,
                                       default=django.utils.timezone.now),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='clubmemberroles',
            name='date_modified',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AddField(
            model_name='clubroles',
            name='date_created',
            field=models.DateTimeField(auto_now_add=True,
                                       default=django.utils.timezone.now),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='clubroles',
            name='date_modified',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AddField(
            model_name='eventregistrationanswers',
            name='question',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='club.EventRegistrationQuestions'),
        ),
        migrations.AddField(
            model_name='eventregistrationanswers',
            name='registration',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='club.EventRegistration'),
        ),
        migrations.AddField(
            model_name='event',
            name='club',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='club.Club'),
        ),
        migrations.AddField(
            model_name='event',
            name='venue',
            field=address.models.AddressField(
                on_delete=django.db.models.deletion.DO_NOTHING,
                to='address.Address'),
        ),
        migrations.AlterUniqueTogether(
            name='eventregistrationquestions',
            unique_together={('event', 'order')},
        ),
        migrations.AlterUniqueTogether(
            name='eventregistrationanswers',
            unique_together={('question', 'registration')},
        ),
    ]
コード例 #8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('address', '0002_auto_20160213_1726'),
    ]

    operations = [
        migrations.CreateModel(
            name='Abilities',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100, verbose_name='Abilities')),
            ],
        ),
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='Activity type')),
                ('slug',
                 autoslug.fields.AutoSlugField(default='',
                                               editable=False,
                                               populate_from='name')),
                ('description',
                 models.TextField(default='',
                                  verbose_name='Activity description')),
                ('picture',
                 models.ImageField(upload_to='activities/',
                                   verbose_name='Image')),
            ],
        ),
        migrations.CreateModel(
            name='Condition',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='Condition Type')),
                ('resume',
                 models.CharField(default='',
                                  max_length=100,
                                  verbose_name='Condition resume')),
                ('description',
                 models.TextField(default='',
                                  verbose_name='Condition description')),
                ('price',
                 django_prices.models.MoneyField(blank=True,
                                                 currency='EUR',
                                                 decimal_places=2,
                                                 default='5',
                                                 max_digits=9,
                                                 verbose_name='tarif')),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(default='',
                                  max_length=150,
                                  verbose_name='Title')),
                ('published',
                 models.BooleanField(default=False, verbose_name='Published')),
                ('publish_at',
                 models.DateTimeField(
                     default=django.utils.timezone.now,
                     verbose_name='Publication date and time')),
                ('slug',
                 autoslug.fields.AutoSlugField(default='',
                                               editable=False,
                                               populate_from='title',
                                               unique=True)),
                ('starts_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='Start date and time')),
                ('ends_at',
                 models.DateTimeField(default=django.utils.timezone.now,
                                      verbose_name='End date and time')),
                ('available_seats',
                 models.IntegerField(blank=True,
                                     default=0,
                                     verbose_name='Available seats')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Organization',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=100,
                                  verbose_name='Organization name')),
                ('active', models.BooleanField(verbose_name='Active')),
                ('slug',
                 autoslug.fields.AutoSlugField(default='',
                                               editable=False,
                                               populate_from='name',
                                               unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='OrganizationPerson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('role',
                 models.SmallIntegerField(choices=[(0, 'Visitor'),
                                                   (10, 'Member'),
                                                   (20, 'Volunteer'),
                                                   (30, 'Admin')],
                                          default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Place',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100,
                                          verbose_name='Name')),
                ('description',
                 models.TextField(default='', verbose_name='Description')),
                ('type',
                 models.CharField(choices=[('rc', 'Repair café'),
                                           ('sc', 'School')],
                                  default='ot',
                                  max_length=2,
                                  verbose_name='Type')),
                ('slug',
                 autoslug.fields.AutoSlugField(default='',
                                               editable=False,
                                               populate_from='name',
                                               unique=True)),
                ('picture',
                 models.ImageField(upload_to='places/', verbose_name='Image')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('address',
                 address.models.AddressField(
                     default='',
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address',
                     verbose_name='Postal address')),
                ('organization',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='plateformeweb.Organization')),
            ],
        ),
        migrations.CreateModel(
            name='OrganizationVolunteer',
            fields=[
                ('organizationperson_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='plateformeweb.OrganizationPerson')),
                ('tagline', models.TextField(verbose_name='Tagline')),
            ],
            bases=('plateformeweb.organizationperson', ),
        ),
    ]
コード例 #9
0
ファイル: 0001_initial.py プロジェクト: omarmarquez/getithere
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_dt', models.DateField()),
                ('end_dt', models.DateField()),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('verified', models.BooleanField(default=False)),
                ('phone_number',
                 models.CharField(
                     blank=True,
                     max_length=15,
                     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}$')
                     ])),
                ('address1',
                 address.models.AddressField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address')),
                ('address2',
                 address.models.AddressField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='+',
                     to='address.Address')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Item',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('available', models.BooleanField(default=False)),
                ('deposit', models.DecimalField(decimal_places=2,
                                                max_digits=6)),
                ('daily_price',
                 models.DecimalField(decimal_places=2, max_digits=6)),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('email', models.EmailField(max_length=254)),
                ('name', models.CharField(max_length=100)),
                ('address',
                 address.models.AddressField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address')),
            ],
        ),
        migrations.CreateModel(
            name='Owner',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('email', models.EmailField(max_length=254)),
                ('verified', models.BooleanField(default=False)),
                ('phone_number',
                 models.CharField(
                     blank=True,
                     max_length=15,
                     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}$')
                     ])),
                ('address1',
                 address.models.AddressField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.Address')),
                ('address2',
                 address.models.AddressField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='+',
                     to='address.Address')),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='store.Location')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Picture',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=35)),
                ('image', models.ImageField(upload_to=b'')),
                ('item',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='store.Item')),
            ],
        ),
        migrations.AddField(
            model_name='item',
            name='location',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='store.Location'),
        ),
        migrations.AddField(
            model_name='item',
            name='owner',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='store.Owner'),
        ),
        migrations.AddField(
            model_name='booking',
            name='customer',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='store.Customer'),
        ),
        migrations.AddField(
            model_name='booking',
            name='item',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='store.Item'),
        ),
    ]
コード例 #10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('address', '0003_auto_20200830_1851'),
        ('auth', '0012_alter_user_first_name_max_length'),
        ('taggit', '0003_taggeditem_add_unique_index'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('password',
                 models.CharField(max_length=128, verbose_name='password')),
                ('last_login',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='last login')),
                ('email', models.EmailField(max_length=127, unique=True)),
                ('first_name', models.CharField(max_length=127)),
                ('last_name', models.CharField(max_length=127)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('date_joined', models.DateTimeField(auto_now_add=True)),
                ('groups',
                 models.ManyToManyField(
                     blank=True,
                     help_text=
                     'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Group',
                     verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(
                     blank=True,
                     help_text='Specific permissions for this user.',
                     related_name='user_set',
                     related_query_name='user',
                     to='auth.Permission',
                     verbose_name='user permissions')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Cause',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=191)),
                ('description', models.TextField()),
                ('slug', models.SlugField()),
                ('cause_image',
                 models.ImageField(
                     default=
                     'https://i.pinimg.com/originals/fa/98/67/fa9867a39c2ec093bad63e91fed2bacb.jpg',
                     upload_to='images/')),
                ('is_deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='CharityOrg',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=191)),
                ('description', models.TextField()),
                ('contact_email', models.EmailField(max_length=254)),
                ('paypal_email', models.EmailField(max_length=254)),
                ('slug', models.SlugField()),
                ('is_deleted', models.BooleanField(default=False)),
                ('charity_image',
                 models.FileField(
                     default=
                     'http://127.0.0.1:8000/media/https:/i.pinimg.com/originals/fa/98/67/fa9867a39c2ec093bad63e91fed2bacb.jpg',
                     null=True,
                     upload_to='images/',
                     verbose_name='')),
                ('authenticated_users',
                 models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
                ('tags',
                 taggit.managers.TaggableManager(
                     help_text='A comma-separated list of tags.',
                     through='taggit.TaggedItem',
                     to='taggit.Tag',
                     verbose_name='Tags')),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('contact_email', models.EmailField(max_length=254)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('paid', models.BooleanField(default=False)),
                ('order_id', models.CharField(max_length=50)),
                ('address',
                 address.models.AddressField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to='address.address')),
                ('charities',
                 models.ManyToManyField(related_name='charity_orders',
                                        to='microDonation.CharityOrg')),
            ],
        ),
        migrations.CreateModel(
            name='LineItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('value', models.DecimalField(decimal_places=2, max_digits=7)),
                ('cause',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='microDonation.cause')),
                ('order',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='microDonation.order')),
            ],
        ),
        migrations.AddField(
            model_name='cause',
            name='charity',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='microDonation.charityorg'),
        ),
        migrations.AddField(
            model_name='cause',
            name='tags',
            field=taggit.managers.TaggableManager(
                help_text='A comma-separated list of tags.',
                through='taggit.TaggedItem',
                to='taggit.Tag',
                verbose_name='Tags'),
        ),
        migrations.CreateModel(
            name='CartItem',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('cart_id', models.CharField(max_length=50)),
                ('value', models.DecimalField(decimal_places=2, max_digits=7)),
                ('cause',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='microDonation.cause')),
            ],
        ),
    ]
コード例 #11
0
ファイル: 0001_initial.py プロジェクト: MTaylor-tech/flare
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('address', '0002_auto_20160213_1726'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Character',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='Unnamed', max_length=100)),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('player_notes', models.TextField(blank=True, max_length=500)),
                ('plot_notes', models.TextField(blank=True, max_length=500)),
                ('logistics_notes', models.TextField(blank=True, max_length=500)),
                ('admin_notes', models.TextField(blank=True, max_length=500)),
                ('bank', models.DecimalField(decimal_places=1, default=22.0, max_digits=6)),
                ('xp', models.DecimalField(decimal_places=4, default=50.0, max_digits=8)),
                ('hp', models.PositiveIntegerField(default=25)),
                ('is_alive', models.BooleanField(default=True)),
                ('is_active', models.BooleanField(default=True)),
                ('character_hours', models.DecimalField(decimal_places=2, default=0.0, max_digits=10)),
                ('image', models.ImageField(blank=True, upload_to=character.models.user_directory_path)),
            ],
        ),
        migrations.CreateModel(
            name='Character_Class',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('abbrev', models.SlugField(max_length=5)),
                ('description', models.TextField(blank=True, max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Character_Race',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('notes', models.TextField(blank=True, max_length=300)),
                ('costuming_notes', models.TextField(blank=True, max_length=300)),
                ('is_pc_race', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bio', models.TextField(blank=True, max_length=500)),
                ('birth_date', models.DateField(blank=True, null=True)),
                ('date_joined', models.DateField(default=django.utils.timezone.now)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_logistics', models.BooleanField(default=False)),
                ('is_plot', models.BooleanField(default=False)),
                ('is_in_leo', models.BooleanField(default=False)),
                ('tokens', models.PositiveIntegerField(default=0)),
                ('unspent_hours', models.PositiveIntegerField(default=0)),
                ('total_hours', models.PositiveIntegerField(default=0)),
                ('address', address.models.AddressField(null=True, on_delete=django.db.models.deletion.SET_NULL, to='address.Address')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Character_Subrace',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('notes', models.TextField(blank=True, max_length=300)),
                ('character_race', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='character.Character_Race')),
            ],
        ),
        migrations.CreateModel(
            name='Character_Skill',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('multiplier', models.PositiveIntegerField(default=1)),
                ('character', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='character.Character')),
            ],
        ),
    ]