All pastes #466862 Raw Edit

Something

public python v1 · immutable
·published 2007-05-02 04:25 UTC
rendered paste body
class Container(models.Model):    name = models.CharField(            blank = False,            maxlength = 50,            )    group = models.ForeignKey(Group)    begin_date = models.DateTimeField(            default = _today_midnight,            )    end_date = models.DateTimeField(            default = _today_midnight,            )    pin_credit_value = models.PositiveIntegerField()    pin_prefix = models.CharField(            maxlength = PIN_STRING_LENGTH,            blank = True,            editable = False,            )    def __str__(self):        return self.name    class Meta:        ordering = ('begin_date', 'group')    class Admin:        list_display = ('name', 'group', 'begin_date', 'end_date')        list_filter = ['group', 'begin_date', 'end_date']class PinBlock(models.Model):    container = models.ForeignKey(            Container,            edit_inline = models.TABULAR,            num_in_admin = 1,            )    description = models.CharField(            core = True,            maxlength = 50,            )    # status = models.ForeignKey(    #         PinBlockState,    #         core = True,    #         )    length = models.PositiveIntegerField(            core = True,            )    vfo = models.PositiveIntegerField(            null = True,            blank = True,            editable = False,            )    vfi = models.PositiveIntegerField(            null = True,            blank = True,            editable = False,            )    def __str__(self):        return self.description    class Admin:        pass