Skip to content

Instantly share code, notes, and snippets.

@mineta
Created March 9, 2014 18:54
Show Gist options
  • Save mineta/9452585 to your computer and use it in GitHub Desktop.
Save mineta/9452585 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
class House(models.Model):
location = models.CharField(
max_length=200,
verbose_name=_("Location"),
help_text=_("Enter the location of the house"),
)
rooms = models.PositiveSmallIntegerField(
verbose_name=_("Number of rooms"),
help_text=_("Enter the number of rooms of the House"),
)
balkon = models.BooleanField(
verbose_name=_("Has balkon"),
help_text=_("Enter if the house has a balkon or not"),
)
class Meta:
verbose_name = _('House')
verbose_name_plural = _('Houses')
ordering = ["location"]
def __unicode__(self):
return _("House located at %s") % self.location
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment