Improve relationship support in sprox/tgext.crud

19 views
Skip to first unread message

Moritz Schlarb

unread,
Apr 19, 2013, 5:15:35 AM4/19/13
to sp...@googlegroups.com, turbogea...@googlegroups.com
I talked a bit with Alessandro about this, and we thought it would be something worth to discuss here:

We plan on improving the support for all-kinds of relationship things:
  • Improve searching for related entities in get_all by allowing to search for name
    (I basically already implemented that in my project and would just need to backport that to sprox/tgext.crud themselves)
  • Improve sorting on relationship columns
  • Add support for creating related entities directly from the add/edit page of the parent entity
    (That would be so awesome!)
Does anyone else think of other useful features in this context?

Cheers,
Moritz

Chris Perkins

unread,
Apr 19, 2013, 11:03:53 AM4/19/13
to sp...@googlegroups.com, turbogea...@googlegroups.com
Moritz,

Great to see some activity in this area.  I actually have implemented parent entity addition with tgext.subform, so be sure to check that out.  If you want I can provide commit access if you want to implement editing.  I agree that searching could be improved, but from what I have seen so far, the existing searching mechanism needs to be solidified because it has caused some bugs in projects I have worked on.  Next time I encounter these bugs I will file the requisite tickets.

Thanks again for your efforts.

cheers.
-chris


--
You received this message because you are subscribed to the Google Groups "sprox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sprox+un...@googlegroups.com.
To post to this group, send email to sp...@googlegroups.com.
Visit this group at http://groups.google.com/group/sprox?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alessandro Molina

unread,
Apr 19, 2013, 1:59:31 PM4/19/13
to sprox, tg-trunk
I think that we can take two things from tgext.subform which would make sense by themselves in crud:
 - The validate method: it makes sense even in other contexts to have a method that can be used to validate data to create an entry.
 - The idea of json based post: Instead of having a subtype_post method we can probably just check the X-Requested-With Header to choose if it is the case to return a json response or the redirect.

On the form side the issue is that tgext.subform relies on TW1, which is not going to see py3 support and is somehow deprecated. 
Also I think we can achieve the same result with less effort, loading the nested form can probably be performed with just loading with something like jQuery.load the form add_form.display() without any template.

Should we probably keep the subfields editing discussion on tg-trunk alone as it actually relates more to tgext.crud than to sprox itself?
Reply all
Reply to author
Forward
0 new messages