[housing] adding a url field in housing capability and management of it in flatboob
This commit is contained in:
parent
c277d2dae7
commit
77995378c5
2 changed files with 6 additions and 1 deletions
|
|
@ -34,6 +34,10 @@ class HousingFormatter(IFormatter):
|
|||
def format_obj(self, obj, alias):
|
||||
result = u'%s%s%s\n' % (self.BOLD, obj.title, self.NC)
|
||||
result += 'ID: %s\n' % obj.fullid
|
||||
|
||||
if hasattr(obj, 'url') and obj.url:
|
||||
result += 'URL: %s\n' % obj.url
|
||||
|
||||
result += 'Cost: %s%s\n' % (obj.cost, obj.currency)
|
||||
result += u'Area: %sm²\n' % (obj.area)
|
||||
if obj.date:
|
||||
|
|
@ -56,6 +60,7 @@ class HousingFormatter(IFormatter):
|
|||
result += '\n\n%sDetails%s\n' % (self.BOLD, self.NC)
|
||||
for key, value in obj.details.iteritems():
|
||||
result += ' %s: %s\n' % (key, value)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class Housing(BaseObject):
|
|||
phone = StringField('Phone number to contact')
|
||||
photos = Field('List of photos', list)
|
||||
details = Field('Key/values of details', dict)
|
||||
|
||||
url = StringField('Url of the the advert')
|
||||
|
||||
class Query(BaseObject):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue