Beispiel #1
0
        class Foo(models.Model):
            bar = models.ForeignKey(Bar, models.CASCADE)
            order = models.OrderWrt()

            class Meta:
                order_with_respect_to = 'bar'
                app_label = 'order_with_respect_to'
Beispiel #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('clickclick', '0002_auto_20140227_2104'),
    ]

    operations = [
        migrations.AddField(
            model_name='photo',
            name='_order',
            field=models.OrderWrt(default=1),
            preserve_default=False,
        ),
    ]
Beispiel #3
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Set',
            fields=[
                ('id', models.AutoField(serialize=False, verbose_name='ID', primary_key=True, auto_created=True)),
                ('reps', models.PositiveSmallIntegerField()),
                ('weight', models.PositiveSmallIntegerField(null=True, blank=True)),
                ('activity', models.ForeignKey(to_field='activity_ptr', to='bodytracker.RepetitionActivity')),
                ('_order', models.OrderWrt()),
            ],
            options={
                'order_with_respect_to': 'activity',
            },
            bases=(models.Model,),
        ),
    ]
Beispiel #4
0
        class Foo(models.Model):
            bar = models.ForeignKey(Bar)
            order = models.OrderWrt()

            class Meta:
                order_with_respect_to = 'bar'