On 7/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

>   * Many-to-many editing as it stands is not useful for my application.
> For example I have a case where the object that the user should edit
> can be related to many objects of a different class. There are
> currently more than 3000 objects that it can relate to. In these
> circumstances the select multiple and javascript enhanced version break
> down. So my other option is the raw_id solution, which is not very user
> friendly. I was thinking I'd provide a third variant which behaves much
> like the raw id admin in that you search for the object you wish to
> refer to, but which works so that you can add and delete associations
> (so they appear listed), and doesn't rely on the meaningless id value.
> People need to see the actual objects.

Have you looked at the new generic relations stuff? It can be very
helpful when relating to objects of different classes. Of course,
there's not much direct admin support for it yet, but it's coming.

In my own work, I have a TaggedItem model that uses the
GenericForeignKey, meaning I can tag objects of any type. The way I
actually apply the tags is to go to the edit view of the object that
needs a tag, where I have some custom Javascript that will take me to
the TaggedItem view, with the correct fields filled in.

>   * Next problem is the edit inline functionality. This in it's current
> form won't do it for my application, but I have several cases where I
> do need to edit some objects in the contex of the containing object.
> These cases are quite complicated, and I'll probably have to write
> quite a bit of specalized code for them. But the primary problem here
> is that you can't add and delete associated objects as people usually
> think of it. So I want to add some javascript code to create a new
> object for inline editing, and javascript code for deleting one.

You know you can add custom javascript to admin edit pages without
changing the Admin code itself, right?
http://www.djangoproject.com/documentation/model_api/#js

Hope that helps,
Jay P.

--~--~---------~--~----~------------~-------~--~----~
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