DR:

Yes your are right. My bad... still my one is not being called.

Here is the code:

class LocatedItemStackedInline(generic.GenericStackedInline):
    template = "admin/location_app/located_items/stacked.html"
    model = LocatedItem
    extra = 1
    form = MyModelForm
    raw_id_fields = ('location',)

    def save_model(self, request, obj, form, change):
        import ipdb;ipdb.set_trace()
        super(LocatedItemStackedInline, self).save_model(request, obj,
form, change)

    def save_form(self, request, form, change):
        import ipdb;ipdb.set_trace()
        super(LocatedItemStackedInline, self).save_form(request, form,
change)


On Oct 15, 11:13 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Oct 15, 2:58 pm, eka <ekagauranga...@gmail.com> wrote:
>
> > Hi all
>
> > I need to override the ModelAdmin save_model and I found out that is
> > not being called. I checked the documentation where it says how to use
> > it and the searched around the code to see if there is a call to that
> > method and can't find any call to save_model anywhere in all Django
> > src (versions 1.0 and 1.1).
>
> >http://docs.djangoproject.com/en/1.0/ref/contrib/admin/#django.contri...
>
> > Any clue? Is this not implemented? Bug? Or I'm missing something?
>
> > Regards
>
> > Esteban (eka)
>
> I don't know where you're looking, but save_model is called from
> add_view, change_view and changelist_view in contrib.admin.options.
> --
> DR.
--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to