コード例 #1
0
class Day(models.model):
    date = models.DateField(auto_now=True)

    notes = models.TextField()

    above_treeline = models.IntField()
    near_treeline = models.IntField()
    below_treeline = models.IntField()
コード例 #2
0
ファイル: models.py プロジェクト: maric92/Marketplace
class Product(models.Model):
    name_prod = models.CharField(max_length=30)
    description_prod = models.CharField(max_length=255)
    price_prod = models.IntField(max_length=1000000)

    def __set__(self):
        return self.name
コード例 #3
0
ファイル: models.py プロジェクト: anorelli7/strava_viz
class Workout(models.Model):
    user = models.CharField(max_length=15)
    location = models.CharField(max_length=55)
    date = models.DateTimeField()
    miles = models.FloatField()
    workout_type = models.ForeignKey('WorkoutType', on_delete=models.CASCADE)
    vertical_ascent = models.IntField()
コード例 #4
0
ファイル: 0001_initial.py プロジェクト: Zhansayaparman/sait
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Kinoteatr',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('kino_name', models.CharField(help_text=' ', max_length=200)),
                ('kino_address', models.CharField(help_text=' ', max_length=200)),

                ('phone_number', models.IntField(blank=True, null=True)),
            ],
            options={
                'ordering': ['kino_name', 'kino_address'],
            },
        ),
        migrations.CreateModel(
            name='Client',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text=' ', max_length=200)),
                ('kinotet', models.CharField(help_text=' ', max_length=200)),

            ],
            options={
                'ordering': ['name'],
            },
        ),
    ]
コード例 #5
0
class Game(models.Model):
    SETUP = 'SE'
    PLAYING = 'PL'
    FINISHED = 'FI'
    STATE_CHOICES = ((SETUP, 'Setup'), (PLAYING, 'Playing'), (FINISHED,
                                                              'Finished'))
    name = models.CharField(max_length=1000)
    max_players = models.IntField()
    created = models.DateTimeField(auto_now_add=True)
    state = models.CharField(max_length=2,
                             choices=STATE_CHOICES,
                             default=SETUP)
コード例 #6
0
ファイル: models.py プロジェクト: Zhansayaparman/sait
class Kinoteatr(models.Model):
    kino_name = models.CharField(max_length=200, help_text=" ")
    kino_address = models.CharField(max_length=200, help_text=" ")
    kino_janr = models.CharField(max_length=200, help_text=" ")
    phone_number = models.IntField(null=True, blank=True)

    class Meta:
        ordering = ["kino_name", "kino_address"]

    def get_absolute_url(self):
        return reverse('kino-detail', args=[str(self.id)])

    def __str__(self):
        return '{0},{1}'.format(self.kino_name, self.kino_address)
コード例 #7
0
ファイル: models.py プロジェクト: simonschuang/docker-django
class General(models.Model):
    _id = models.IntField(default=0)
    name = models.CharField(max_length=30)
    machine_uuid = models.CharField(max_length=60)
    serial_number = models.CharField(max_length=60)
コード例 #8
0
ファイル: models.py プロジェクト: ashah01581/Project
class sqlserverconn(models.Model):
    brand_id = models.IntField()
    brand_name = models.CharField(max_length=255)