[Patchew-devel] [PATCH 7/9] rest: add support for PUT of result objects

Fam Zheng famz at redhat.com
Wed Aug 22 08:52:14 UTC 2018


On Wed, 08/22 10:35, Paolo Bonzini wrote:
> On 22/08/2018 08:14, Fam Zheng wrote:
> >> +    @property
> >> +    def result_renderer(self):
> >> +        try:
> >> +            found = re.match("^[^.]*", self.kwargs['name'])
> > Maybe create a Result.mod field so this magic is not necessary? Otherwise the
> > convention should be documented somewhere.
> > 
> 
> Do you mean something like Result.renderer_from_name (a staticmethod)?

I mean can we somehow match the self.kwargs['name'] string back to DB record(s),
where we can create a new field that "duplicates" the first part of the name
(the part before the first "." as matched in this line)?

Fam




More information about the Patchew-devel mailing list