Permalink
Browse files

KNN: give ReferenceSetProxy model attr

  • Loading branch information...
1 parent f3d62ea commit ae548968f1c0488d6f42f073622414ad097bf663 @brendonh committed Aug 7, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 warp/crud/colproxy.py
View
@@ -479,7 +479,11 @@ class ReferenceSetProxy(BaseProxy):
Currently supports only one-to-many
"""
- allowCreate = True
+ def __init__(self, obj, col, model=None, allowCreate=True)
+ self.obj = obj
+ self.col = col
+ self.model = model if model else getCrudClass(refClass)
+ self.allowCreate = allowCreate
def render_view(self, request):
@@ -498,7 +502,7 @@ def render_view(self, request):
return renderTemplateObj(request,
template,
- model=getCrudClass(refClass),
+ model=model,
presets=presets,
postData=postData,
noEdit=noEdit,

0 comments on commit ae54896

Please sign in to comment.