Created
January 28, 2018 21:43
-
-
Save katiayn/132e6d2f01d7a84428ca069265fa7db8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Property(models.Model): | |
price = models.DecimalField(max_digits=15, decimal_places=2) | |
rooms = models.PositiveIntegerField() | |
address = models.TextField(null=True, blank=True) | |
city = models.CharField(max_length=255) | |
country = models.CharField(max_length=255) | |
class Meta: | |
abstract = True | |
class House(Property): | |
pass | |
class Apartment(Property): | |
floor = models.PositiveIntegerField() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment