-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Bennett wrote:
> On 7/11/06, Lucas Vogelsang <[EMAIL PROTECTED]> wrote:
>> I am looking for an implementation for a ManyToMany relation. I
>> quite like the way one can create the relations in the admin
>> interface. However I can't find a template nor a view for this in
>> my django source tree. Anybody can help me with this?
>
> That's because it's generated entirely with JavaScript.
>
> The admin views create a normal HTML 'select' element in the page,
> but also ensure that the files 'SelectBox.js' and
> 'SelectFilter2.js' are included inside script tags; these contain
> the JavaScript which turns the normal 'select' into the nice filter
> interface.
>
But this is only half of the code. I am also interested in how django
transforms(I suppose this is in some view?) the formdata(from the
selectbox) into a ManyToMany-Object. How it determines what to add and
what relation to remove.

lucas
> Code is in these files:
>
> http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/media/js/SelectBox.js
> 
> http://code.djangoproject.com/browser/django/trunk/django/contrib/admin/media/js/SelectFilter2.js
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Signed with GPG & Enigmail - see http://www.vincisolutoins.ch/pgp/

iD8DBQFEs9Ok3RQ/RpGW2HgRAl5wAJ42+MBMkWPQjeuHa578BG0e9I0q6wCZAX99
y5syS5Rr/q9eZN+SIIWy7kA=
=FE5J
-----END PGP SIGNATURE-----


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to