On 5/1/2009 4:29 AM, eli wrote:
> Hi,
> 
> I have problem with save_form, save_model, save_formset methods in
> Admin class admin.TabularInline.
> 
> class AAdmin(admin.TabularInline):
>     model = A1
>     extra = 3
> 
>     def save_form(self, request, form, change):
>         print "form"
>         return form.save(commit=False)
> 
>     def save_model(self, request, obj, form, change):
>         print "model"
>         obj.save()
> 
>     def save_formset(self, request, form, formset, change):
>         print "formset"
>         formset.save()
> 
> 
> class BAdmin(admin.ModelAdmin):
>     inlines = [AAdmin]
> 
>     def save_model(self, request, obj, form, change):
>         super(BAdmin, self).save_model(request, obj, form, change)
> 
> When I save BAdmin in Admin Panel the method in AAdmin aren't called.
> 
> Where is the problem?

The problem is you're not telling us what it is you're trying to achieve.

It's hard to debug code without knowing what you're tying to do, other 
than to say what you already know -- this doesn't work. The fact that 
you are trying to override `save_formset()` in `AAdmin` tells me you're 
stabbing in the dark a little bit.

-- 
George

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