The problem was that I was overriding the save_model method on the
InlineAdmin instead of on the ModelAdmin itself.
Now is being called...
Cheers. and thanks!
On Oct 15, 11:16 am, eka wrote:
> DR:
>
> Yes your are right. My bad... still my one is not being called.
>
> Here is the code:
>
> cla
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 = ('l
Is this what you were looking for?
def save_model(self, request, obj, form, change):
"""
Given a model instance save it to the database.
"""
obj.save()
It is in contrib.admin.options:
-- Peter
--~--~-~--~~~---~--~~
You received
On Oct 15, 2:58 pm, eka 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 sav
Also overriding the Model.save is not an option since I need to use
the request object that is passed to the save_model method cause I
have some stuff in the request I need to use.
Any clue?
On Oct 15, 11:07 am, eka wrote:
> But is there any reason why I can't use that one? Is documented :P
>
>
But is there any reason why I can't use that one? Is documented :P
On Oct 15, 11:05 am, Bayuadji wrote:
> Hi,
>
> You could override save on Model instead.
>
> -djibon-
>
> On 10/15/09, eka wrote:
>
>
>
>
>
> > Hi all
>
> > I need to override the ModelAdmin save_model and I found out that is
>
Hi,
You could override save on Model instead.
-djibon-
On 10/15/09, eka 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
7 matches
Mail list logo