-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Description
The idea is to wide domain model views functionality for specifying views for related models.
class Photo(models.DomainModel):
id = fields.Int()
url = fields.String()
content_type = fields.String()
public_view = views.View(include=[url])
class Profile(models.DomainModel):
id = fields.Int()
name = fields.String()
main_photo = fields.Model(Photo)
public_view = views.View(include=[name, main_photo],
contexts=[views.Context(field=main_photo,
view=Photo.public_view)])Notes:
- Design - TBD