Esempio n. 1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('body', models.TextField()),
                ('category',
                 models.CharField(max_length=20,
                                  validators=[community.models.category_check
                                              ])),
                ('publish_date', models.DateTimeField(auto_now_add=True)),
                ('edit_date', models.DateTimeField(auto_now=True)),
            ],
        ),
    ]
Esempio n. 2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Community',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=150)),
                ('content', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('date', models.CharField(max_length=20)),
                ('hits', models.PositiveIntegerField(default=0)),
                ('image',
                 models.ImageField(
                     blank=True,
                     upload_to=community.models.articles_image_path)),
                ('like_users',
                 models.ManyToManyField(blank=True,
                                        related_name='like_articles',
                                        to=settings.AUTH_USER_MODEL)),
                ('recommend_users',
                 models.ManyToManyField(blank=True,
                                        related_name='recommend_articles',
                                        to=settings.AUTH_USER_MODEL)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   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.CharField(max_length=200)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('article',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='community.Community')),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, max_length=150, verbose_name='username')),
                ('email', models.EmailField(blank=True, error_messages={'unique': 'A user with that email already exists.'}, max_length=254, unique=True, verbose_name='email address')),
                ('first_name', models.CharField(blank=True, max_length=50, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=50, verbose_name='last name')),
                ('is_public_email', models.BooleanField(default=False, verbose_name='Показывыть email другим пользователям')),
                ('is_public_b_date', models.BooleanField(default=False, verbose_name='Показывыть дату рождения другим пользователям')),
                ('is_public_has_children_choices', models.BooleanField(default=False, verbose_name='Показывыть другим пользователям имеются ли дети')),
                ('has_children', models.SmallIntegerField(choices=[(0, 'Да'), (1, 'Нет'), (2, 'Будут меньше, чем через 9 месяцев'), (3, 'Не указано')], default=3, verbose_name='Есть ли дети')),
                ('b_date', models.DateField(blank=True, null=True, verbose_name='Дата рождения')),
                ('gender', models.SmallIntegerField(choices=[(2, 'Мужской'), (1, 'Женский'), (0, 'Не указано')], default=0, verbose_name='Пол')),
                ('avatar', django_resized.forms.ResizedImageField(blank=True, crop=None, force_format=None, keep_meta=True, null=True, quality=0, size=[180, 180], upload_to=community.models.generate_file_name, verbose_name='Аватар')),
                ('country', models.IntegerField(choices=[(0, ''), (1, 'Россия'), (2, 'Азербайджан'), (3, 'Армения'), (4, 'Беларусь'), (5, 'Грузия'), (6, 'Казахстан'), (7, 'Киргизия'), (8, 'Латвия'), (9, 'Литва'), (10, 'Молдавия'), (11, 'Таджикистан'), (12, 'Туркменистан'), (13, 'Узбекистан'), (14, 'Украина'), (15, 'Эстония'), (16, 'Австралия'), (17, 'Австрия'), (18, 'Албания'), (19, 'Алжир'), (20, 'Ангола'), (21, 'Арабские Эмираты'), (22, 'Аргентина'), (23, 'Аруба'), (24, 'Афганистан'), (25, 'Багамские острова'), (26, 'Бангладеш'), (27, 'Барбадос'), (28, 'Бельгия'), (29, 'Бенин'), (30, 'Бермудские острова'), (31, 'Болгария'), (32, 'Боливия'), (33, 'Босния и Герцеговина'), (34, 'Бразилия'), (35, 'Бруней'), (36, 'Великобритания'), (37, 'Венгрия'), (38, 'Венесуэлла'), (39, 'Вьетнам'), (40, 'Гаити'), (41, 'Гамбия'), (42, 'Гондурас'), (43, 'Гваделупа'), (44, 'Гватемала'), (45, 'Гвинея'), (46, 'Германия'), (47, 'Гибралтар'), (48, 'Нидерланды'), (49, 'Гонконг'), (50, 'Гренада'), (51, 'Гренландия'), (52, 'Греция'), (53, 'Гуана'), (54, 'Дания'), (55, 'Доминиканская Республика'), (56, 'Египет'), (57, 'Демократическая республика Конго'), (58, 'Замбия'), (59, 'Зимбабве'), (60, 'Израиль'), (61, 'Индия'), (62, 'Индонезия'), (63, 'Иордания'), (64, 'Ирак'), (65, 'Иран'), (66, 'Ирландия'), (67, 'Исландия'), (68, 'Испания'), (69, 'Италия'), (70, 'Йемен'), (71, 'Каймановы острова'), (72, 'Камерун'), (73, 'Канада'), (74, 'Кения'), (75, 'Кипр'), (76, 'Китай'), (77, 'Колумбия'), (78, 'Камбоджа'), (79, 'Конго'), (80, 'Корея (Южная)'), (81, 'Коста Рика'), (82, 'Куба'), (83, 'Кувейт'), (84, 'Либерия'), (85, 'Лихтенштейн'), (86, 'Люксембург'), (87, 'Мавритания'), (88, 'Мадагаскар'), (89, 'Македония'), (90, 'Малайзия'), (91, 'Мали'), (92, 'Мальта'), (93, 'Мексика'), (94, 'Мозамбик'), (95, 'Монако'), (96, 'Монголия'), (97, 'Морокко'), (98, 'Намибия'), (99, 'Непал'), (100, 'Нигерия'), (102, 'Никарагуа'), (103, 'Новая Зеландия'), (104, 'Норвегия'), (105, 'Пакистан'), (106, 'Панама'), (107, 'Папуа Новая Гвинея'), (108, 'Парагвай'), (109, 'Перу'), (110, 'Польша'), (111, 'Португалия'), (112, 'Пуэрто Рико'), (113, 'Румыния'), (114, 'Саудовская Аравия'), (115, 'Сенегал'), (116, 'Сингапур'), (117, 'Сирия'), (118, 'Словакия'), (119, 'Словения'), (120, 'Сомали'), (121, 'Судан'), (122, 'США'), (123, 'Тайвань'), (124, 'Таиланд'), (125, 'Тринидад и Тобаго'), (126, 'Тунис'), (127, 'Турция'), (128, 'Уганда'), (129, 'Уругвай'), (130, 'Филиппины'), (131, 'Финляндия'), (132, 'Франция'), (133, 'Чад'), (134, 'Чехия'), (135, 'Чили'), (136, 'Швейцария'), (137, 'Швеция'), (138, 'Шри-Ланка'), (139, 'Эквадор'), (140, 'Эфиопия'), (141, 'ЮАР'), (142, 'Сербия'), (143, 'Ямайка'), (144, 'Япония'), (145, 'Бахрейн'), (146, 'Андорра'), (147, 'Белиз'), (148, 'Бутан'), (149, 'Ботсвана'), (150, 'Буркина Фасо'), (151, 'Бурунди'), (152, 'Центральноафриканская Республика'), (153, 'Коморос'), (154, 'Кот-Д`ивуар'), (155, 'Джибути'), (156, 'Восточный Тимор'), (157, 'Эль Сальвадор'), (158, 'Экваториальная Гвинея'), (159, 'Эритрея'), (160, 'Фижи'), (161, 'Габон'), (162, 'Гана'), (163, 'Гвинея-Биссау'), (164, 'Корея (Северная)'), (165, 'Ливан'), (166, 'Лесото'), (167, 'Ливия'), (168, 'Мальдивы'), (169, 'Маршалские острова'), (170, 'Нигер'), (171, 'Оман'), (172, 'Катар'), (173, 'Руанда'), (174, 'Самоа'), (175, 'Сейшеллы'), (176, 'Сьерра-Леоне'), (177, 'Суринам'), (178, 'Свазиленд'), (179, 'Танзания'), (180, 'Западная Сахара'), (181, 'Хорватия'), (182, 'Ангилья'), (183, 'Антарктида'), (184, 'Антигуа и Барбуда'), (185, 'Остров Буве'), (186, 'Британские территории в Индийском Океане'), (187, 'Британские Виргинские острова'), (188, 'Мьянма'), (189, 'Кабо-Верде'), (190, 'Остров Рождества'), (191, 'Кокосовые острова'), (192, 'Острова Кука'), (193, 'Доминика'), (194, 'Фолклендские острова'), (195, 'Фарерские острова'), (196, 'Гвиана'), (197, 'Французская Полинезия'), (198, 'Южные Французские территории'), (199, 'Острова Херд и Макдоналд'), (200, 'Кирибати'), (201, 'Лаос'), (202, 'Макао'), (203, 'Малави'), (204, 'Мартиника'), (205, 'Маврикий'), (206, 'Майотта'), (207, 'Микронезия'), (208, 'Монтсеррат'), (209, 'Науру'), (210, 'Антильские острова'), (211, 'Новая Каледония'), (212, 'Ниуэ'), (213, 'Остров Норфолк'), (214, 'Палау'), (215, 'Палестина'), (216, 'Остров Питкэрн'), (217, 'Реюньон'), (218, 'Остров Св.Елены'), (219, 'Острова Сент-Киттс и Невис'), (220, 'Санта-Лючия'), (221, 'Острова Сен-Пьер и Микелон'), (222, 'Сент-Винсент и Гренадины'), (223, 'Сан-Марино'), (224, 'Соломоновы острова'), (225, 'Южная Георгия и Южные Сандвичевы острова'), (226, 'Острова Шпицберген и Ян-Майен'), (227, 'Того'), (228, 'Токелау'), (229, 'Тонга'), (230, 'Острова Тёркс и Кайкос'), (231, 'Тувалу'), (232, 'Американские Виргинские острова'), (233, 'Вануату'), (234, 'Ватикан'), (235, 'Острова Уоллис и Футуна'), (236, 'Черногория')], default=1, verbose_name='Страна')),
                ('city', models.CharField(blank=True, max_length=150, null=True, verbose_name='Город')),
                ('notes', models.CharField(blank=True, max_length=1000, null=True, verbose_name='О себе')),
                ('old_password_hash', models.CharField(blank=True, max_length=40, null=True)),
                ('activation_code', models.CharField(blank=True, db_index=True, max_length=32, null=True, verbose_name='Код активации')),
                ('old_id', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=150, null=True, verbose_name='Имя')),
                ('text', models.TextField(verbose_name='Текст комментария')),
            ],
            options={
                'verbose_name': 'Комментарий',
                'verbose_name_plural': 'Комментарии',
            },
        ),
    ]
Esempio n. 4
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('date_posted',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('intro_paragraph', models.TextField()),
                ('ingredients', models.TextField()),
                ('method', models.TextField()),
                ('author',
                 models.ForeignKey(on_delete=models.SET(
                     community.models.get_sentinel_user),
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 5
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Community',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=25, unique=True)),
                ('title', models.CharField(max_length=50)),
                ('about', models.CharField(max_length=500)),
                ('dt_creation', models.DateTimeField(default=django.utils.timezone.now)),
                ('icon', models.ImageField(default='community\\default_icon.png', storage=common.storage.OverwriteStorage(), upload_to=community.models.CommunityIconSavePath)),
                ('banner', models.ImageField(blank=True, null=True, storage=common.storage.OverwriteStorage(), upload_to=community.models.CommunityBannerSavePath)),
                ('highlight_color_hex', models.CharField(blank=True, default='000000', max_length=8)),
                ('admins', models.ManyToManyField(related_name='administered_communities', to=settings.AUTH_USER_MODEL)),
                ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Membership',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dt_join', models.DateTimeField(default=django.utils.timezone.now)),
                ('community', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='community.Community')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='community',
            name='members',
            field=models.ManyToManyField(related_name='joined_communities', through='community.Membership', to=settings.AUTH_USER_MODEL),
        ),
    ]
Esempio n. 6
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Community',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('about', models.CharField(max_length=750)),
                ('date_created', models.DateTimeField(auto_now=True)),
                ('picture',
                 models.ImageField(
                     upload_to=community.models.get_community_pics_directory)),
                ('banner_picture',
                 models.ImageField(upload_to=community.models.
                                   get_community_bannerpics_directory)),
                ('admin',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='admin_community',
                                   to=settings.AUTH_USER_MODEL)),
                ('disabeled_users',
                 models.ManyToManyField(related_name='disabeled_users',
                                        to=settings.AUTH_USER_MODEL)),
                ('users',
                 models.ManyToManyField(related_name='in_community',
                                        to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 7
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Articles',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=200, verbose_name='Заголовок')),
                ('body',
                 ckeditor_uploader.fields.RichTextUploadingField(
                     verbose_name='Описание')),
                ('creation_date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date published')),
                ('slug', models.SlugField(blank=True, max_length=70)),
                ('follow',
                 models.ManyToManyField(blank=True,
                                        related_name='articles_follow',
                                        to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='Forums',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name',
                 models.CharField(max_length=70,
                                  unique=True,
                                  verbose_name='Имя форума')),
                ('description',
                 models.TextField(blank=True,
                                  max_length=1000,
                                  verbose_name='Краткое описание')),
                ('creation_date',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date published')),
                ('image',
                 models.ImageField(
                     blank=True,
                     upload_to=community.models.get_upload_file_name,
                     verbose_name='Изображение')),
                ('slug', models.SlugField(blank=True, max_length=70)),
                ('follow',
                 models.ManyToManyField(blank=True,
                                        related_name='forums_follow',
                                        to=settings.AUTH_USER_MODEL)),
                ('username',
                 models.ForeignKey(max_length=100,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL,
                                   verbose_name='Пользователь')),
            ],
            options={
                'managed': True,
            },
        ),
        migrations.AddField(
            model_name='articles',
            name='forum',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='community.Forums',
                verbose_name='Форум'),
        ),
        migrations.AddField(
            model_name='articles',
            name='username',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
    ]
Esempio n. 8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='CommunityComments',
            fields=[
                ('comment_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('discussion_id', models.IntegerField()),
                ('comment_author_id', models.CharField(max_length=64)),
                ('comment_publish_date',
                 models.DateTimeField(auto_now_add=True)),
                ('comment_description', models.TextField(max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='CommunityDiscussions',
            fields=[
                ('discussion_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('discussion_author_id', models.CharField(max_length=64)),
                ('discussion_publish_date',
                 models.DateTimeField(auto_now_add=True)),
                ('discussion_title', models.CharField(max_length=32)),
                ('discussion_description', models.TextField(max_length=500)),
                ('discussion_maximum_comments',
                 models.IntegerField(default=100)),
                ('discussion_type', models.CharField(max_length=8)),
                ('discussion_tags', models.TextField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='ConversationMessages',
            fields=[
                ('conversation_id', models.IntegerField()),
                ('message_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('message_text', models.TextField(max_length=500)),
                ('user_id', models.IntegerField()),
                ('message_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Conversations',
            fields=[
                ('conversation_id',
                 models.AutoField(primary_key=True, serialize=False)),
                ('user_ids', models.TextField(default='')),
                ('conversation_title',
                 models.CharField(default='', max_length=32)),
                ('conversation_history', models.TextField(default='')),
                ('admin_id', models.CharField(max_length=24)),
            ],
        ),
        migrations.CreateModel(
            name='UserProfiles',
            fields=[
                ('user_id', models.AutoField(primary_key=True,
                                             serialize=False)),
                ('username', models.CharField(max_length=24)),
                ('user_description', models.TextField(max_length=256,
                                                      null=True)),
                ('user_following', models.TextField(default='')),
                ('user_threads', models.TextField(default='')),
                ('user_profile_image',
                 models.ImageField(default='profile/profile.jfif',
                                   upload_to=community.models.get_image_path)),
                ('user_date_joined', models.DateTimeField(auto_now_add=True)),
                ('user_saved_threads', models.TextField(default='')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('authentic', models.BooleanField(default=False)),
                ('traderlevel',
                 models.CharField(choices=[('Beginner', 'Beginner'),
                                           ('Intermediate', 'Intermediate'),
                                           ('Advanced', 'Advanced'),
                                           ('Expert', 'Expert'),
                                           ('ProTrader', 'ProTrader')],
                                  default='Beginner',
                                  max_length=12)),
                ('gender',
                 models.CharField(choices=[('Male', 'Male'),
                                           ('Female', 'Female')],
                                  default='Male',
                                  max_length=6)),
                ('name', models.CharField(blank=True, max_length=30)),
                ('image',
                 models.ImageField(
                     blank=True,
                     upload_to='community/images/userpfp/',
                     validators=[community.models.validate_image])),
                ('bio', models.CharField(blank=True, max_length=300)),
                ('country',
                 django_countries.fields.CountryField(blank=True,
                                                      max_length=2)),
                ('instagram', models.URLField(blank=True)),
                ('dateregistered', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Trade',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('pair',
                 models.CharField(choices=[('EUR_USD', 'EUR_USD'),
                                           ('GBP_USD', 'GBP_USD'),
                                           ('USD_JPY', 'USD_JPY'),
                                           ('AUD_USD', 'AUD_USD'),
                                           ('NZD_USD', 'NZD_USD'),
                                           ('USD_CAD', 'USD_CAD'),
                                           ('USD_CHF', 'USD_CHF'),
                                           ('EUR_GBP', 'EUR_GBP'),
                                           ('GBP_JPY', 'GBP_JPY'),
                                           ('AUD_GBP', 'AUD_GBP'),
                                           ('GBP_NZD', 'GBP_NZD'),
                                           ('GBP_CAD', 'GBP_CAD'),
                                           ('GBP_CHF', 'GBP_CHF'),
                                           ('EUR_JPY', 'EUR_JPY'),
                                           ('EUR_AUD', 'EUR_AUD'),
                                           ('EUR_NZD', 'EUR_NZD'),
                                           ('EUR_CAD', 'EUR_CAD'),
                                           ('EUR_CHF', 'EUR_CHF'),
                                           ('AUD_JPY', 'AUD_JPY'),
                                           ('AUD_NZD', 'AUD_NZD'),
                                           ('AUD_CAD', 'AUD_CAD'),
                                           ('AUD_CHF', 'AUD_CHF'),
                                           ('CAD_JPY', 'CAD_JPY'),
                                           ('NZD_CAD', 'NZD_CAD'),
                                           ('CAD_CHF', 'CAD_CHF'),
                                           ('NZD_JPY', 'NZD_JPY'),
                                           ('NZD_CHF', 'NZD_CHF'),
                                           ('CHF_JPY', 'CHF_JPY'),
                                           ('XAU_USD', 'XAU_USD'),
                                           ('XBT_USD', 'XBT_USD'),
                                           ('XNG_USD', 'XNG_USD'),
                                           ('XTI_USD', 'XTI_USD'),
                                           ('BTC_USD', 'BTC_USD')],
                                  default='EUR_USD',
                                  max_length=10)),
                ('description', models.CharField(blank=True, max_length=100)),
                ('pips',
                 models.PositiveSmallIntegerField(
                     blank=True,
                     default=1,
                     null=True,
                     validators=[
                         django.core.validators.MaxValueValidator(5000)
                     ])),
                ('amount_currency',
                 djmoney.models.fields.CurrencyField(choices=[('EUR', 'EUR'),
                                                              ('USD', 'USD'),
                                                              ('GBP', 'GBP')],
                                                     default='USD',
                                                     editable=False,
                                                     max_length=3)),
                ('amount',
                 djmoney.models.fields.MoneyField(
                     blank=True,
                     currency_choices=(('EUR', 'EUR'), ('USD', 'USD'),
                                       ('GBP', 'GBP')),
                     decimal_places=0,
                     default_currency='USD',
                     max_digits=7,
                     null=True)),
                ('winlose',
                 models.CharField(choices=[('WIN', 'WIN'), ('LOSE', 'LOSE'),
                                           ('BE', 'BE')],
                                  max_length=4)),
                ('lotsize',
                 models.DecimalField(
                     blank=True,
                     decimal_places=2,
                     max_digits=5,
                     null=True,
                     validators=[
                         django.core.validators.MinValueValidator(0.01)
                     ])),
                ('openedpositionon',
                 models.DateField(default=django.utils.timezone.now)),
                ('image',
                 models.ImageField(
                     upload_to='community/images/trades/',
                     validators=[community.models.validate_image])),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Esempio n. 10
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Requirement',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=25)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('description', models.TextField()),
                ('is_verified', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_name', models.CharField(max_length=40)),
                ('last_name', models.CharField(max_length=40)),
                ('display_name', models.CharField(max_length=25, unique=True)),
                ('grade', models.PositiveIntegerField()),
                ('published_date', models.DateField(auto_now_add=True)),
                ('last_updated', models.DateField(auto_now=True)),
                ('show_full_name', models.BooleanField(default=False)),
                ('is_public', models.BooleanField(default=False)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='StudentImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(
                     upload_to=community.models.image_upload_to)),
            ],
        ),
        migrations.CreateModel(
            name='StudentNeed',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('target', models.PositiveIntegerField()),
                ('achievement', models.PositiveIntegerField(default=0)),
                ('completed', models.BooleanField(default=False)),
                ('active', models.BooleanField(default=True)),
                ('measurement', models.CharField(max_length=10)),
                ('description', models.TextField()),
                ('published_date', models.DateField(auto_now_add=True)),
                ('last_updated', models.DateField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Village',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('is_verified', models.BooleanField(default=False)),
                ('district',
                 models.CharField(choices=[
                     ('jhapa', 'Jhapa District'), ('ilam', 'Ilam District'),
                     ('panchthar', 'Panchthar District'),
                     ('taplejung', 'Taplejung District'),
                     ('morang', 'Morang District'),
                     ('sunsari', 'Sunsari District'),
                     ('bhojpur', 'Bhojpur District'),
                     ('dhankuta', 'Dhankuta District'),
                     ('terhathum', 'Terhathum District'),
                     ('sankhuwasabha', 'Sankhuwasabha District'),
                     ('saptari', 'Saptari District'),
                     ('siraha', 'Siraha District'),
                     ('udayapur', 'Udayapur District'),
                     ('khotang', 'Khotang District'),
                     ('okhaldhunga', 'Okhaldhunga District'),
                     ('solukhumbu', 'Solukhumbu District'),
                     ('dhanusa', 'Dhanusa District'),
                     ('mahottari', 'Mahottari District'),
                     ('sarlahi', 'Sarlahi District'),
                     ('sindhuli', 'Sindhuli District'),
                     ('ramechhap', 'Ramechhap District'),
                     ('dolakha', 'Dolakha District'),
                     ('bhaktapur', 'Bhaktapur District'),
                     ('dhading', 'Dhading District'),
                     ('kathmandu', 'Kathmandu District'),
                     ('kavrepalanchok', 'Kavrepalanchok District'),
                     ('lalitpur', 'Lalitpur District'),
                     ('nuwakot', 'Nuwakot District'),
                     ('rasuwa', 'Rasuwa District'),
                     ('sindhupalchok', 'Sindhupalchok District'),
                     ('bara', 'Bara District'), ('parsa', 'Parsa District'),
                     ('rautahat', 'Rautahat District'),
                     ('chitwan', 'Chitwan District'),
                     ('makwanpur', 'Makwanpur District'),
                     ('gorkha', 'Gorkha District'),
                     ('kaski', 'Kaski District'),
                     ('lamjung', 'Lamjung District'),
                     ('syangja', 'Syangja District'),
                     ('tanahun', 'Tanahun District'),
                     ('manang', 'Manang District'),
                     ('kapilvastu', 'Kapilvastu District'),
                     ('nawalparasi', 'Nawalparasi District'),
                     ('rupandehi', 'Rupandehi District'),
                     ('arghakhanchi', 'Arghakhanchi District'),
                     ('gulmi', 'Gulmi District'), ('palpa', 'Palpa District'),
                     ('baglung', 'Baglung District'),
                     ('myagdi', 'Myagdi District'),
                     ('parbat', 'Parbat District'),
                     ('mustang', 'Mustang District'),
                     ('dang', 'Dang Deukhuri District'),
                     ('pyuthan', 'Pyuthan District'),
                     ('rolpa', 'Rolpa District'), ('rukum', 'Rukum District'),
                     ('salyan', 'Salyan District'),
                     ('dolpa', 'Dolpa District'), ('humla', 'Humla District'),
                     ('jumla', 'Jumla District'),
                     ('kalikot', 'Kalikot District'),
                     ('mugu', 'Mugu District'), ('banke', 'Banke District'),
                     ('bardiya', 'Bardiya District'),
                     ('surkhet', 'Surkhet District'),
                     ('dailekh', 'Dailekh District'),
                     ('jajarkot', 'Jajarkot District'),
                     ('kailali', 'Kailali District'),
                     ('achham', 'Achham District'), ('doti', 'Doti District'),
                     ('bajhang', 'Bajhang District'),
                     ('bajura', 'Bajura District'),
                     ('kanchanpur', 'Kanchanpur District'),
                     ('dadeldhura', 'Dadeldhura District'),
                     ('baitadi', 'Baitadi District'),
                     ('darchula', 'Darchula District')
                 ],
                                  default='taplejung',
                                  max_length=15)),
                ('description', models.TextField()),
            ],
        ),
    ]