mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Followed style guide for model attribute ordering.
This commit is contained in:
@@ -135,12 +135,12 @@ class Price(models.Model):
|
||||
price = models.DecimalField(max_digits=10, decimal_places=2)
|
||||
quantity = models.PositiveIntegerField()
|
||||
|
||||
def __str__(self):
|
||||
return "%s for %s" % (self.quantity, self.price)
|
||||
|
||||
class Meta:
|
||||
unique_together = (('price', 'quantity'),)
|
||||
|
||||
def __str__(self):
|
||||
return "%s for %s" % (self.quantity, self.price)
|
||||
|
||||
|
||||
class MexicanRestaurant(Restaurant):
|
||||
serves_tacos = models.BooleanField(default=False)
|
||||
|
||||
Reference in New Issue
Block a user