pinax-models icon indicating copy to clipboard operation
pinax-models copied to clipboard

Fix RemovedInDjango18Warning

Open naringas opened this issue 9 years ago • 4 comments

RemovedInDjango18Warning: LogicalDeleteModelAdmin.querysetmethod should be renamedget_queryset.

django.contrib.admin.ModelAdmin.get_queryset

naringas avatar Aug 06 '15 21:08 naringas

@naringas instead of renaming the function why not adding it as a new function to keep backward compatibility??

If i am not mistaken if you rename this you will be breaking previous django versions

psychok7 avatar Aug 08 '15 17:08 psychok7

get_queryset is supported from django 1.6 (so this change will break django 1.5), however not having this change will break django 1.8

so, add this @psychok7?

def queryset(self, request):
    return self.get_queryset(self, request)

naringas avatar Aug 10 '15 13:08 naringas

breaking 1.5 is fine I think

jtauber avatar Aug 10 '15 13:08 jtauber

@naringas exactly.

psychok7 avatar Aug 10 '15 13:08 psychok7