Re: CalendarWidget als Nur-Zeit-Widget

Andreas Jung <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization ZOPYX Ltd & Co. KG
Message-ID <[email protected]>
Ich bringe es noch mal auf den Punkt: DateTimeField + CalendarWidget zu
verwenden,
um ausschliesslich eine Uhrzeit zu speichern ist broken-by-design (das
CalendarWidget
von Plone ist sowie ziemlich kaputt).

Optionen:

 - zwei String/Integerfields 'hour' + 'minute' mit jeweils einem
SelectionWidget
   und Vokabular 0..23 bzw. 0..59
 - ein eigenes TimeWidget schreiben (mit zwei Selection Widgets
hour+minute),
   welche das Resultat oder als Integer speichert
 - eventuell kann man mit CompoundField ein 'hour' + 'minute' Widget
   zusammenfassen
 - StringField + StringWidget zur manuellen Eingabe eines Datums verwenden
   (mit entsprechendem Validator)

Andreas


On 13.06.09 21:30, Hans Friedrich wrote:
> Danke Andreas,
>
> anderer Ansatz, gleiches Problem:
>
> Frischer ContentType:
>
> DatumstestSchema = schemata.ATContentTypeSchema.copy() + atapi.Schema((
>
>     # -*- Your Archetypes field definitions here ... -*-
>     atapi.DateTimeField(
>         'Zeit',
>         storage=atapi.AnnotationStorage(),
>         widget=atapi.CalendarWidget(
>             show_ymd=False,
>             label="bla"),
>         required=True,
>     ),
>
> ))
>
> Am 13.06.2009 um 21:27 schrieb Andreas Jung:
>
>> On 13.06.09 21:21, Hans Friedrich wrote:
>>> Hallo Liste,
>>>
>>> ich habe einen ContentType, der von ATEvent abgeleitet ist. Da ich nur
>>> Zeiten speichern möchte,
>> Ich würde sagen, falscher Ansatz. Ein Event ist immer mit einem Datum
>> assoziiert. Daher macht es keinen
>> Sinn hierfür ATEvent zu verbiegen und so zu tun als gäbe es Termine ohne
>> Datum und nur mit einer Uhrzeit...
>> sorry, das macht keinen Sinn. Was ist der Usecase? Es ist sicherlich
>> einfacher eine eigene AT-basierte Implementierung
>> *ohne* ATEvent zu realisieren.
>>
>> Andreas
>>
>> <lists.vcf>
>>
>> _______________________________________________
>> zope mailing list
>> [email protected]
>> https://mail.dzug.org/mailman/listinfo/zope
>


-- 
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: [email protected] - Phone +49 - 7071 - 793376
Registergericht: Amtsgericht Stuttgart, Handelsregister A 381535
Geschäftsführer/Gesellschafter: ZOPYX Limited, Birmingham, UK
------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lists.vcf (text/x-vcard, 316 B)
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[email protected]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.