diff options
Diffstat (limited to 'chimere/main/models.py')
| -rw-r--r-- | chimere/main/models.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/chimere/main/models.py b/chimere/main/models.py index f8f4c80..5744529 100644 --- a/chimere/main/models.py +++ b/chimere/main/models.py @@ -41,6 +41,7 @@ class News(models.Model): return self.title class Meta: verbose_name = _("News") + verbose_name_plural = _("News") class TinyUrl(models.Model): """Tinyfied version of permalink parameters @@ -121,6 +122,8 @@ class Icon(models.Model): name = models.CharField(_("Name"), max_length=150) image = models.ImageField(_("Image"), upload_to='icons', height_field='height', width_field='width') + height = models.IntegerField(_("Height")) + width = models.IntegerField(_("Width")) def __unicode__(self): return self.name class Meta: @@ -183,9 +186,11 @@ class Marker(models.Model): ''' name = models.CharField(_("Name"), max_length=150) subcategory = models.ForeignKey(SubCategory, verbose_name=_("Subcategory")) - point = PointField(_("Localisation")) + point = PointField(_("Localisation"), srid=settings.EPSG_DISPLAY_PROJECTION) picture = models.ImageField(_("Image"), upload_to='upload', blank=True, - height_field='height', width_field='width') + null=True, height_field='height', width_field='width') + height = models.IntegerField(_("Height"), blank=True, null=True) + width = models.IntegerField(_("Width"), blank=True, null=True) STATUS = (('S', _('Submited')), ('A', _('Available')), ('D', _('Disabled')),) @@ -251,9 +256,11 @@ class Route(models.Model): ''' name = models.CharField(_("Name"), max_length=150) subcategory = models.ForeignKey(SubCategory, verbose_name=_("Subcategory")) - route = RouteField(_("Route")) + route = RouteField(_("Route"), srid=settings.EPSG_DISPLAY_PROJECTION) picture = models.ImageField(_("Image"), upload_to='upload', blank=True, - height_field='height', width_field='width') + null=True, height_field='height', width_field='width') + height = models.IntegerField(_("Height"), blank=True, null=True) + width = models.IntegerField(_("Width"), blank=True, null=True) STATUS = (('S', _('Submited')), ('A', _('Available')), ('D', _('Disabled')),) @@ -393,9 +400,9 @@ class Area(models.Model, SimpleArea): order = models.IntegerField(_("Order")) available = models.BooleanField(_("Available")) upper_left_corner = models.PointField(_("Upper left corner"), - default='POINT(0 0)') + default='POINT(0 0)', srid=settings.EPSG_DISPLAY_PROJECTION) lower_right_corner = models.PointField(_("Lower right corner"), - default='POINT(0 0)') + default='POINT(0 0)', srid=settings.EPSG_DISPLAY_PROJECTION) objects = models.GeoManager() def __unicode__(self): |
