Hallöchen!

Arien writes:

> On Tue, Jul 15, 2008 at 10:53 AM, Torsten Bronger
> <[EMAIL PROTECTED]> wrote:
>
>> In a display template (not a form, just display), I write the
>> following:
>>
>>    <td>{% trans 'Temperature:' %}</td>
>>    <td>{{ layer.heating_temperature }}</td>
>>
>> I'd like to use the verbose_name of the model instance instead of
>> hard-wiring the label in the template.  How can I access it?
>
> The verbose_name is at layer._meta.verbose_name.  You can't access
> it like that from your template, though.

Okay, thanks!  However, then what is the "official" way to do it?
Putting it in the template as in the above snippet?  This smells
like DRY-violation to me.  Should I create a ModelForm instance
although there is no <form>?

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: [EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to