On Tue, Jun 14, 2011 at 5:18 PM, Alex Kamedov <kame
...@gmail.com> wrote:
> Thank you for sharing good solution, Gregor!
> Your solution works great if you has one related lookup. If you need work
> with some related fields you must write more javascript code whitch looks
> like mankey patching.
> On Tue, Jun 14, 2011 at 4:29 PM, Gregor Müllegger <gre...@muellegger.de>wrote:
>> Hi I needed to do the same in my own projects, however I just
>> decorated the functions which I wanted to modify. Like:
>> original_dismissRelatedLookupPopup = window.dismissRelatedLookupPopup;
>> window.dismissRelatedLookupPopup = function () {
>> // put your own code here ...
>> original_dismissRelatedLookupPopup.apply(this, arguments);
>> };
>> Maybe this helps until a way is introduced in django to modify this
>> behaviour.
>> --
>> Servus,
>> Gregor Müllegger
>> On Jun 13, 2011 4:23 PM, "Harris Lapiroff" <harrislapir...@gmail.com>
>> wrote:
>> > I think this is a great idea! I would certainly benefit from it.
>> > It might be worth considering if there are any methods for passing a
>> > callback function that are better than GET parameters—though I can't
>> > think of any off the top of my head.
>> > H.
>> > On Jun 13, 12:16 am, Alex Kamedov <kame...@gmail.com> wrote:
>> >> Hi all!
>> >> I make integration with warehouse system and want to reuse existing
>> >> functionality in django.contrib.admin to manage links between this
>> system
>> >> and catalog on site.
>> >> I can't get access to warehouse system database, I have only export
>> file. I
>> >> write some views to represent its items in django admin. And now I need
>> >> something like related field in django admin forms, but has some
>> filters
>> >> applied to changelist and has some other user interface.
>> >> I think, the best solution for this case is put some links with
>> >> showRelatedObjectLookupPopup javascript function on admin changelist,
>> but
>> >> after user choose the object, my own javascript function must
>> >> be called instead of dismissRelatedLookupPopup javascript function.
>> >> Execution of dismissRelatedLookupPopup is hard coded in python code
>> now. The
>> >> easiest way to implement use case described higher is adding new GET
>> >> argument "_callback" to changelist view.
>> >> What are you think about this? If this solution was accepted I can
>> write
>> >> patch and tests for it.
>> >> Cheers!
>> >> --
>> >> Alex Kamedov
>> >> skype: kamedov www: kamedov.ru
>> > --
>> > You received this message because you are subscribed to the Google
>> Groups "Django developers" group.
>> > To post to this group, send email to django-developers@googlegroups.com
>> .
>> > To unsubscribe from this group, send email to
>> django-developers+unsubscribe@googlegroups.com.
>> > For more options, visit this group at
>> http://groups.google.com/group/django-developers?hl=en.
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers" group.
>> To post to this group, send email to django-developers@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-developers+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-developers?hl=en.
> --
> Alex Kamedov
> skype: kamedov www: kamedov.ru