Пример #1
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Country',
            fields=[
                ('code', models.CharField(default='', max_length=10, primary_key=True, serialize=False)),
                ('name', models.CharField(default='', max_length=52)),
                ('continent', enumfields.fields.EnumField(default='Asia', enum=Data.models.Continent, max_length=10)),
                ('region', models.CharField(default='', max_length=26)),
                ('surfacearea', models.FloatField(default=0.0, max_length=10.2)),
                ('indyear', models.IntegerField(default='NULL')),
                ('populaton', models.IntegerField(default=0)),
                ('lifeexpectany', models.FloatField(default='NULL', max_length=3)),
                ('gnp', models.FloatField(default='NULL', max_length=10.2)),
                ('gnppold', models.FloatField(default='NULL', max_length=10.2)),
                ('localname', models.CharField(default='', max_length=100)),
                ('govtform', models.CharField(default='', max_length=100)),
                ('headofsate', models.CharField(default='', max_length=10)),
                ('capital', models.CharField(default='', max_length=11)),
                ('code2', models.CharField(default='', max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('first_name', models.CharField(max_length=20)),
                ('last_name', models.CharField(max_length=20)),
                ('email', models.EmailField(max_length=60, primary_key=True, serialize=False, unique=True)),
                ('gender', models.CharField(max_length=8)),
                ('phone', models.CharField(max_length=13)),
            ],
        ),
        migrations.CreateModel(
            name='CountryLanguage',
            fields=[
                ('language', models.CharField(default='', max_length=30, primary_key=True, serialize=False)),
                ('iosofficial', enumfields.fields.EnumField(default='F', enum=Data.models.official, max_length=10)),
                ('percantage', models.FloatField(default=0.0, max_length=4.2)),
                ('code', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Data.Country')),
            ],
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.IntegerField(auto_created=True, default=0, primary_key=True, serialize=False)),
                ('name', models.CharField(default='', max_length=35)),
                ('Distrist', models.CharField(default='', max_length=20)),
                ('populaton', models.IntegerField(default=0)),
                ('code', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Data.Country')),
            ],
        ),
    ]
Пример #2
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('score', models.IntegerField(default=0)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Profile',
                'ordering': ['-user'],
            },
        ),
        migrations.CreateModel(
            name='UserData',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('file', models.FileField(upload_to=Data.models.user_directory_path)),
                ('score', models.IntegerField(default=0)),
                ('uploaded_at', models.DateTimeField(auto_now_add=True)),
                ('processed', models.BooleanField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'User Data',
                'ordering': ['-score'],
            },
        ),
        migrations.CreateModel(
            name='Version',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('version', models.CharField(max_length=20, unique=True)),
                ('log', models.TextField(max_length=500)),
                ('date', models.DateField()),
                ('critical', models.BooleanField()),
            ],
            options={
                'verbose_name': 'Version',
                'verbose_name_plural': 'Version',
                'ordering': ['-date'],
            },
        ),
        migrations.AddField(
            model_name='userdata',
            name='version',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='Data.Version'),
        ),
    ]
Пример #3
0
class EvaluationCitation(models.Model):
    A = models.BigIntegerField(null=False)
    Symb = models.CharField(max_length=4, null=False)
    Update = models.IntegerField(null=False)
    Citation = models.CharField(max_length=100)
    PubDate = models.CharField(max_length=100)
    Authors = models.CharField(max_length=200)
Пример #4
0
class Parents(models.Model):
    A = models.IntegerField(null=False)
    Z = models.IntegerField(null=False)
    Symb = models.CharField(max_length=4, null=False)
    iZA = models.BigIntegerField(null=False)
    El = models.FloatField(null=True)
    ElStr = models.CharField(max_length=46)
    TSek = models.FloatField(null=True)
    TStr = models.CharField(max_length=74)
    JPi = models.CharField(max_length=56)
    Abund = models.FloatField(null=True)
    AbundStr = models.CharField(max_length=54)
    SnStr = models.CharField(max_length=100)
    SpStr = models.CharField(max_length=100)

    def __unicode__(self):
        return unicode(self.Symb) + u"-" + unicode(self.A)
Пример #5
0
class Parents2(models.Model):
    iZA = models.BigIntegerField(null=False)
    nMode = models.IntegerField()
    DSID = models.CharField(max_length=60, null=True)
    Spec = models.CharField(max_length=4)
    Mode = models.CharField(max_length=16)
    Perc = models.FloatField(null=True)
    PercStr = models.CharField(max_length=100)
    QStr = models.CharField(max_length=100)
Пример #6
0
class XRays(models.Model):
    XCode = models.BigIntegerField()
    Z = models.IntegerField()
    Energy = models.FloatField(null=False)
    Element = models.CharField(max_length=4)
    Assignment = models.CharField(max_length=100)
    Kint = models.FloatField(null=True)
    KintStr = models.CharField(max_length=100, null=True)
    L1Int = models.FloatField(null=True)
    L1IntStr = models.CharField(max_length=100, null=True)
    L2Int = models.FloatField(null=True)
    L2IntStr = models.CharField(max_length=100, null=True)
    L3Int = models.FloatField(null=True)
    L3IntStr = models.CharField(max_length=100, null=True)
Пример #7
0
class Augers(models.Model):
    ACode = models.BigIntegerField()
    Z = models.IntegerField()
    Energy = models.FloatField(null=False)
    Element = models.CharField(max_length=4)
    Assignment = models.CharField(max_length=100)
    Kint = models.FloatField(null=True)
    KintStr = models.CharField(max_length=100, null=True)
    L1Int = models.FloatField(null=True)
    L1IntStr = models.CharField(max_length=100, null=True)
    L2Int = models.FloatField(null=True)
    L2IntStr = models.CharField(max_length=100, null=True)
    L3Int = models.FloatField(null=True)
    L3IntStr = models.CharField(max_length=100, null=True)


#
# class Parents(models.Model):
# 	iZA = models.BigIntegerField(null = False)
#
# class Parents2(models.Model):
# 	iZA = models.BigIntegerField(null = False)
#
# class Production(models.Model):
# 	iZA = models.BigIntegerField(null = False)
#
# class References(models.Model):
# 	iZA = models.BigIntegerField(null = False)
#
# class Status(models.Model):
# 	DatabaseID = models.CharField(max_length = 510)
#
# class Terms(models.Model):
# 	ID = models.BigIntegerField()
#
# class XIntensities(models.Model):
# 	iZA = models.BigIntegerField(null = False)
#
# class XRays(models.Model):
# 	XCode = models.BigIntegerField()
Пример #8
0
class References(models.Model):
    iZA = models.BigIntegerField(null=False)
    KeyNo = models.CharField(null=False, max_length=16)
    Mode = models.IntegerField(null=False)  #Maps to nMode in Parents2