maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] [PATCH 4/6] Add layout, stylesheet and papersize to


From: Maxime Petazzoni
Subject: Re: [Maposmatic-dev] [PATCH 4/6] Add layout, stylesheet and papersize to MapRenderingForm
Date: Thu, 5 Aug 2010 09:49:47 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

* Thomas Petazzoni <address@hidden> [2010-08-05 00:54:25]:

> The form used to ask the user for the various parameters of the map
> needs to be extended with the new layout, stylesheet and papersize
> parameters.
> 
> As OCitySMap doesn't yet implement the list of layouts, stylesheets
> and paper sizes, so we use stub lists.

-so

>  from django import forms
>  from django.utils.translation import ugettext_lazy as _
> +from django.utils.safestring import mark_safe

As said, this should come before the ugettext_lazy import (s < t)

> +        self.fields['papersize'].choices = \
> +            [(p[0], mark_safe("%s <em style=\"color: grey;\">(%.1f &times; 
> %.1f cm²)</em>" % \
> +                                  (p[0], p[1] / 10., p[2] / 10.))) for p in 
> get_papersize_list()]
> +

Is this 80-char limited? Also, use a CSS class to style the dimensions
instead of hardcoding a color here.

Otherwise LGTM.

- Maxime
-- 
Maxime Petazzoni <http://www.bulix.org>
 ``One by one, the penguins took away my sanity.''
Linux kernel and software developer at MontaVista Software

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]