Massimo, I know that you're not much into including this in SQLFORM
(since 20% of the time people wish to store extra fields in the M2M
table such as 'Quantity'), but for me this would be really useful.
Does anyone have samples of work they've done on this?
- ideally by extending SQLFORM (or t2.create() / t2.update()) but even
manual HTML examples would be great
- code ideal but even screenshots or a demo app to play with to se how
it should look would be useful
For me, I'm more interested in UUID links than ID ones, so an
implementation that handles that nicely would be perfect :)
Many thanks,
Fran.
vince
unread,
Dec 30, 2008, 12:59:39 AM12/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
this is a simple one. maybe you can base on this widget and workout
something.
-vince
On Dec 30, 4:39 am, Fran <francisb...@googlemail.com> wrote:
> I agree with this thread that a good method for handling the 80% case
> where the Many-to-Many just has the mapping fields would be really
>
> Massimo, I know that you're not much into including this in SQLFORM
> (since 20% of the time people wish to store extra fields in the M2M
> table such as 'Quantity'), but for me this would be really useful.
>
> I guess the implementation would end up looking something like this:http://code.google.com/p/django-ajax-filtered-fields/
> this is a simple one. maybe you can base on this widget and workout
> something.
t2.widget() is indeed a nice, simple UI to look at borrowing from.
This uses a single text field to store entries rather than a Many-to-
Many field, so I guess performance will get bad when storing lots of
entries?
I'll also need to be able to select from potentially hundreds of
options, so the solution isn't scalable as-is...I think I want to be
able to select the options from the output of a t2.search() &/or an
AutoComplete.
Anyway, I'll look at that code & see if it can be used as a starting
point :)
F
Fran
unread,
Dec 30, 2008, 8:47:45 AM12/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
> t2.widget()
t2.tag_widget() of course ;)
Another issue with using this widget as-is would be referential
integrity - need to ensure that all lists are updated if 'tags' are
deleted (not generally an issue for real tags, but is for when trying
to squeeze m2m functionality into here)
F
Fran
unread,
Dec 30, 2008, 9:17:06 AM12/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
& another limitation ;)
I need to be able to store both UUI & Name.
t2.tag_widget() can't store dicts, only lists...
F
vince
unread,
Dec 30, 2008, 11:48:34 AM12/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
oh actually i haven't look t2's widget yet. i'll have a look
i will need to sort out a widget for m2m using multiple select box too
soon. i'll post it here if i come up with anything.
i had an implement for below 50 options using a single text field
holding the id in csv. that's no good for you if you're looking for
hundreds of entries
-vinc
mdipierro
unread,
Dec 30, 2008, 2:05:18 PM12/30/08
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to web2py Web Framework
I will soon release an improved version. Possibly tomorrow.