Closed GoogleCodeExporter closed 9 years ago
generally, not a bad idea.
what I don´t like about it:
1. the fact that we add a method get_related_lookup.
2. using text/html as in order to check for the response.
3. and most important, the related-lookups should work like a raw-id-field
(that´s the basic idea).
so, let´s see if we get feedback from other people.
is it possible to use a custom widget instead?
regards,
patrick
Original comment by sehmaschine
on 14 Jan 2011 at 1:15
@1 adding an "optional" method to the admin class doesn't hurt me. It wouldn't
even hurt me if its on the model it self.
@2 changing the whole response to json would anyway be my prefered way.
In this way the whole process could be cleaned up alot.
e.g.: {data:'/media/image_thumb.jpg', type: 'thumbnail'}
@3 honestly, it's a while since I have used the default admin interface. Does
it make a lookup for this fields?
my basic usecase for this is that i usually store every uploaded mediafile
togehter with its exif data, title, copyright,... in a media model. In the
admin interface editors connect instances of these model to other objects
instead of images directly.
so i typically end up with a inline model for related images. showing editors
the filename instead of thumbnails makes them stiching needles into the voodoo
doll representation of me.
Original comment by defaultw...@gmail.com
on 14 Jan 2011 at 1:51
I´ve been giving this issue some thoughts and I do believe that you should
open a ticket for django since this issue is more related to the original
admin-interface than to grappelli. I totally understand the usecase and I´d
like to see the possibility to customize raw-id-field as much as possible. as
already mentioned, the raw-id-field includes a lookup (with no immediate
response) – so I think that this lookup needs to be changed before we discuss
any implementation with grappelli.
any thoughts on this?
Original comment by sehmaschine
on 23 Jan 2011 at 3:34
closing this as "wontfix" for now since it´s primarily related to django (and
not grappelli) IMO. hope that raw-id-fields will be easier to customize in the
near future.
Original comment by sehmaschine
on 2 Feb 2011 at 6:30
Original comment by sehmaschine
on 2 Feb 2011 at 6:30
I think it's more related to grappelli: what about introducing a new projekt
setting like:
GRAPPELLI_RELATED_RENDER_METHOD = 'foo'
and use it in the related_lookup()-method if exists in the model or modeladmin?
Original comment by stefanoe...@gmail.com
on 18 May 2011 at 7:46
I don´t agree with that. as long as it´s so tricky to deal with
raw-id-fields, I´m not willing to add more complexity to grappelli (it´s much
better to simplify the django-side and then add features to grappelli). sorry.
Original comment by sehmaschine
on 21 May 2011 at 8:29
Original issue reported on code.google.com by
defaultw...@gmail.com
on 14 Jan 2011 at 1:02Attachments: