@
zeq usable = CarCardList.objects.filter(car_card__iexact=code)
usable = CarCardList.objects.filter(car_card__exact=code)
class CarCardList(models.Model):
car_card = models.CharField(max_length=255, unique=True)
is_used = models.BooleanField(default=False)
get_from = models.ForeignKey(Merchant)
used_time = models.IntegerField(null=True)
user = models.ForeignKey(User, null=True)
def __unicode__(self):
return self.car_card
这两个方法都没用,环境是windows mysql