Hi,
Thanksit works like champion.
Rgrds,
Setiaman Lee
On Wed, Apr 11, 2012 at 3:00 PM, Святослав Б wrote:
> Hi!
>
> Override ModelAdmin get_form() method and filter your field.
>
> class MyAdmin(admin.ModelAdmin):
> def get_form(self, request, obj=None, **kwargs):
> form = super
Hi!
Override ModelAdmin get_form() method and filter your field.
class MyAdmin(admin.ModelAdmin):
def get_form(self, request, obj=None, **kwargs):
form = super(MyAdmin,self).get_form(request, obj,**kwargs)
form.base_fields['field'].queryset =
form.base_fields['field'].queryset
Hi,
I managed to set in the QuerySet of ModelAdmin to only allow user to
see their own record.
But when the child model link to parent model using ForeignKey a Drop
Down will be automatically created for the respective column.
Is there anyway to filter the drop down to only show the records that
3 matches
Mail list logo