Re: Vorhandes Produkt um weitere Felder erweitern: collective.realestatebroker

Michael Kiberu <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
Erledigt. (selfrendered=False)

On 04/07/2010 07:29 PM, Michael Kiberu wrote:
> Hallo Allen,
>
> ich habe das Produkt "collective.realestatebroker" für plone 3.x um ein
> paar Felder erweitert, die auch im Edit Modus angezeigt werden.
>
> Nur in der Ansicht fehlen alle gänzlich. Ich werde nicht schlau aus dem
> Template, wie ich die neuen Felder ebenfalls anzeigen kann.
>
> Vielleicht hat jemand ein Tip, wie ich vorgehen kann?
> Folgende Änderungen machte ich:
> interfaces.py habe ich das Interface „IRealEstateContent“ erweitert:
> contact_name = schema.TextLine(title = _(u'Contact name'))
>
>
>
> In der Datei „commercial.py“ und „residential.py“ habe ich der Klasse
> „Commercial“ und „Residential“ die zusätzlichen Felder implementiert.
>
> contact_name = atapi.ATFieldProperty('contact_name')
>
>
> In der Datei „schemata.py“ habe ich die zusätzlichen Felder implementiert
>
> atapi.StringField('contact_name',
>
> storage=atapi.AnnotationStorage(),
> schemata=u'default',
> selfrendered=True, # For REB-specific template rendering.
> widget = atapi.StringWidget(label = _(u'Contact name'),
> )
> ),
>
> In der Datei „controlpanel.py“ die get und set Methoden implementiert,
>
> def get_contact_name(self):
> value = getattr(self.context, 'contact_name', u'')
> value = safe_unicode(value, getSiteEncoding(self.context))
> return value
>
> def set_contact_name(self, value):
> value = safe_unicode(value, getSiteEncoding(self.context))
> self.context._updateProperty('contact_name', value)
>
> Super wäre es natürlich wenn jemand damit schon mal gearbeitet hat und
> mir noch unter die Arme greifen könnte. Sonst bin ich für jede Hilfe
> dankbar. Die View habe ich mitangehangen.
>
> Gruß,
> Michael
>
>
>
>
>
> _______________________________________________
> zope mailing list
> [email protected]
> https://mail.dzug.org/mailman/listinfo/zope


_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
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.